From patchwork Wed Aug 23 10:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13362022 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 721C1EE49A0 for ; Wed, 23 Aug 2023 10:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234201AbjHWKpw (ORCPT ); Wed, 23 Aug 2023 06:45:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234111AbjHWKpf (ORCPT ); Wed, 23 Aug 2023 06:45:35 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFAC6CEF for ; Wed, 23 Aug 2023 03:45:08 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-319e93a1594so4932844f8f.1 for ; Wed, 23 Aug 2023 03:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692787507; x=1693392307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XCsHx28OSfGIG+PvNDPUNK2MaUL6kouSWRdKAXaz/kg=; b=H2r5bhMm6ONKKK0NCsANReANW5qbk5jwUWuO/AkUutYicn4F4RtDjIWYgnCWL4sbnM 9A95zGcf5X27bazHpaANPIy8xXpMpD9+t+7mdnV3hJqi2sHVRBj52GiZi6O8EHltP3DO X2wpV2/yuewNNj9SF6gi5c/z2WewNtFHva7hhjBUNfWx3Jbsz3bW0Br5xHIqS6ttQO5z PAnLkEbKqpgHh7Re0l1JJgu255k4L2y962HVaPVkgG7qC14iI6100mBfi3eMtYdvXxC5 rxyGNrRFf6nbZwtTftzC0zvXpXq+w1OFoSSUCdm8Ikt3qn97zBv/k7OLkR6SDWUvOgt7 CtUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692787507; x=1693392307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XCsHx28OSfGIG+PvNDPUNK2MaUL6kouSWRdKAXaz/kg=; b=U9Ri5Fn1uPTPwUAhgSsh/5tHRLkotRzAxPoaeLSDkU8l1T4UWpEYtTu2KLI4tzxOtz KGOLTpnJoisuhFFaw5lMlfdvl2JUKpuafLMwlo2l5OdCdDaJrG4+xhBeuOy+LO4xqCCh o5sFc6XzvTwEufOh32vIUUvnvUQVUsfANC+qgwpo0z5lyZB1g9GESACzazEoidYanLKx swCTvJ7P9iwM5ZIv2VD1wH+lUqhFNdva+5K50VT2mDKlDxkXhB5DoP3MwLbRMitEh9ny BPbzXKHOijicsyEezCedCoZ1k8Vl8g3B0E1gwLIaPR6P5R3CfmrYt5MUGA11jZTQYcCI kJLA== X-Gm-Message-State: AOJu0YwxKM06Yn8WLjU/T+dTuxz75wU3TTqOIqfVKnJsZRed0PW7u5I1 Li/nL0lV3N89Ls5sAIbd9GOqaA== X-Google-Smtp-Source: AGHT+IGVKSeQ9pWkxj/wfJ5G7eC3j8hb189Gfl4C+aJGuO8hAf/xOXoj4r1JD6nqQSjkTuoTbb7UYw== X-Received: by 2002:adf:e5c4:0:b0:317:eee2:6fba with SMTP id a4-20020adfe5c4000000b00317eee26fbamr10244304wrn.40.1692787507028; Wed, 23 Aug 2023 03:45:07 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id n4-20020a5d4204000000b0031c5dda3aedsm6281213wrq.95.2023.08.23.03.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 03:45:06 -0700 (PDT) From: Bryan O'Donoghue To: rfoss@kernel.org, todor.too@gmail.com, bryan.odonoghue@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 14/15] media: qcom: camss: Convert vfe_disable() from int to void Date: Wed, 23 Aug 2023 11:44:43 +0100 Message-ID: <20230823104444.1954663-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230823104444.1954663-1-bryan.odonoghue@linaro.org> References: <20230823104444.1954663-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org No version of vfe_disable() currently returns nor has ever as near as I can discern ever returned a meaningful error code. Convert from the unused int return to void. Fixes: 633b388f85c5 ("media: camss: Refactor VFE HW version support") Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss-vfe-170.c | 5 ++--- drivers/media/platform/qcom/camss/camss-vfe-480.c | 5 ++--- drivers/media/platform/qcom/camss/camss-vfe-gen1.c | 5 ++--- drivers/media/platform/qcom/camss/camss-vfe-gen1.h | 3 +-- drivers/media/platform/qcom/camss/camss-vfe.c | 5 +---- drivers/media/platform/qcom/camss/camss-vfe.h | 2 +- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c index c2487a8196db7..b6b425ac2e867 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -562,9 +562,8 @@ static int vfe_enable(struct vfe_line *line) * vfe_disable - Disable streaming on VFE line * @line: VFE line * - * Return 0 on success or a negative error code otherwise */ -static int vfe_disable(struct vfe_line *line) +static void vfe_disable(struct vfe_line *line) { struct vfe_device *vfe = to_vfe(line); @@ -578,7 +577,7 @@ static int vfe_disable(struct vfe_line *line) mutex_unlock(&vfe->stream_lock); - return 0; + return; } /* diff --git a/drivers/media/platform/qcom/camss/camss-vfe-480.c b/drivers/media/platform/qcom/camss/camss-vfe-480.c index b1a07e846e25b..be00a713163e1 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-480.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-480.c @@ -397,9 +397,8 @@ static int vfe_enable(struct vfe_line *line) * vfe_disable - Disable streaming on VFE line * @line: VFE line * - * Return 0 on success or a negative error code otherwise */ -static int vfe_disable(struct vfe_line *line) +static void vfe_disable(struct vfe_line *line) { struct vfe_device *vfe = to_vfe(line); @@ -413,7 +412,7 @@ static int vfe_disable(struct vfe_line *line) mutex_unlock(&vfe->stream_lock); - return 0; + return; } /* diff --git a/drivers/media/platform/qcom/camss/camss-vfe-gen1.c b/drivers/media/platform/qcom/camss/camss-vfe-gen1.c index 239d3d4ac6661..5e8319e565bbc 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-gen1.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-gen1.c @@ -95,9 +95,8 @@ static int vfe_disable_output(struct vfe_line *line) * vfe_gen1_disable - Disable streaming on VFE line * @line: VFE line * - * Return 0 on success or a negative error code otherwise */ -int vfe_gen1_disable(struct vfe_line *line) +void vfe_gen1_disable(struct vfe_line *line) { struct vfe_device *vfe = to_vfe(line); @@ -114,7 +113,7 @@ int vfe_gen1_disable(struct vfe_line *line) mutex_unlock(&vfe->stream_lock); - return 0; + return; } static void vfe_output_init_addrs(struct vfe_device *vfe, diff --git a/drivers/media/platform/qcom/camss/camss-vfe-gen1.h b/drivers/media/platform/qcom/camss/camss-vfe-gen1.h index 6d5f9656562c8..b82137a2cb578 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-gen1.h +++ b/drivers/media/platform/qcom/camss/camss-vfe-gen1.h @@ -82,9 +82,8 @@ static inline u8 vfe_calc_interp_reso(u16 input, u16 output) * vfe_gen1_disable - Disable streaming on VFE line * @line: VFE line * - * Return 0 on success or a negative error code otherwise */ -int vfe_gen1_disable(struct vfe_line *line); +void vfe_gen1_disable(struct vfe_line *line); /* * vfe_gen1_enable - Enable VFE module diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index 73380e75dbb22..d6c5628d51903 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -766,10 +766,7 @@ static int vfe_set_stream(struct v4l2_subdev *sd, int enable) dev_err(vfe->camss->dev, "Failed to enable vfe outputs\n"); } else { - ret = vfe->ops->vfe_disable(line); - if (ret < 0) - dev_err(vfe->camss->dev, - "Failed to disable vfe outputs\n"); + vfe->ops->vfe_disable(line); } return ret; diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h index cbc314c4e244b..b2f4192576364 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.h +++ b/drivers/media/platform/qcom/camss/camss-vfe.h @@ -112,7 +112,7 @@ struct vfe_hw_ops { void (*reg_update_clear)(struct vfe_device *vfe, enum vfe_line_id line_id); void (*subdev_init)(struct device *dev, struct vfe_device *vfe); - int (*vfe_disable)(struct vfe_line *line); + void (*vfe_disable)(struct vfe_line *line); int (*vfe_enable)(struct vfe_line *line); int (*vfe_halt)(struct vfe_device *vfe); void (*violation_read)(struct vfe_device *vfe);