Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3675995yba; Tue, 23 Apr 2019 07:49:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVY30BqUh6pXy3wAC9byrWTCMf23aWrv0CvLOwNdUeOBQD2eM447c4upwryTMM5ZgQqUCv X-Received: by 2002:a65:5184:: with SMTP id h4mr25138875pgq.109.1556030941449; Tue, 23 Apr 2019 07:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556030941; cv=none; d=google.com; s=arc-20160816; b=a4XHGwuqo5NZXpLy6Qa5vMkvUb5PEHwjRxPoRed73nBaC3GcsI4r5TCPhTIK+QtBte al/L1HDhna008fwOau9kWyyis1wXTM4vyVaGNyyDb77EpkizJzY5sRmniyUytA4d8l5k E4XVM1Z5wyYQZOHQcK3YQVieDFqN2a2uMs+nWpjoZS9SFFz4uKcGJhd0HsxGAOrKUZXZ vT03snnnOiPMCBf/5CQpmHRZ6s/tPi5cEy5M+8hloKKkHCHhtnHuMCkv1v6cyW8MfccO jBEV+TxUqb7NA1cUJDD6WjaZvoJLqnaSerIG1oMbtfZX2Max4RI8/vLo85C2kLi0GQrW OY/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=sLF03lZ2Iim5bhmL1FcWVbfZrAVD/hxQUV2C8iXSzWI=; b=cjIHQvTmsSfQCX6Stn3X5Y2aKsGm4v7sDKb9L+RYF6jynnOA04AtNrFMVSZ90iOGd/ QPAb3kdMYYk3LxKhOz6tEFpgY11T4lhCtyhztDEXozmWpRqhN7Y+hZGwYINCXWUIHt0J 9OeBvF4Afebrd1gRIKaRxzi/ugVa7oYm7RXLq/9fzyySYzA8x8bkToO3F/s0b99b+uab fgJelGY/qti++W/xnQ0CbWYopDATHxrT9bJLxp0aGNcO62ez25jEaZrZk3xJOvpZy1Aj 1Q6/Q2b4SG1mvYqyTSJZ266IJePoKghSKowjQQqyY/2oWAK2XD2NEujsutoW47Odihj9 +3zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f7sO7mNB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p85si16550536pfi.27.2019.04.23.07.48.44; Tue, 23 Apr 2019 07:49:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f7sO7mNB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727761AbfDWOrv (ORCPT + 99 others); Tue, 23 Apr 2019 10:47:51 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:41278 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfDWOru (ORCPT ); Tue, 23 Apr 2019 10:47:50 -0400 Received: by mail-ot1-f68.google.com with SMTP id 64so13025723otb.8 for ; Tue, 23 Apr 2019 07:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sLF03lZ2Iim5bhmL1FcWVbfZrAVD/hxQUV2C8iXSzWI=; b=f7sO7mNBeM9Vf2897QPLnrQ6KcBehihxfMddfEy+A6VSKyzB90ZyUuX0LfOav8ss4f W2YjeLSoScZ3KH8TW/9ahhl969I7R7cCLJxRK2O5MOp8/zPpEjrC38nfBepErXtPWg52 d8j4jEnzlmLUuvh+plf1lWkqJ9I9rvEAcr6pmpQiyJkX96QwvxDX60bGxTQNROL7TTmC izKt6hgftO6qfEQkQ3BrZj/U7ptZp1TBum3tbLBs+QDcJkpTLxoFTEvTjNSz6OSdcUVG nX35hpYXbbZKgYZwfeVWPOF/aNny29kSqkl+obfw5QcqpYcMwyfypIEmcIM1NAcQ3wfE vOWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sLF03lZ2Iim5bhmL1FcWVbfZrAVD/hxQUV2C8iXSzWI=; b=WzbYHEc2NB5RtvzKYld6T8jUFEfdrPSPx8cyqqI8vqY3ApDO+zIhWIiDdnYENXZRg/ Pboxf5f+cdyKr9zZQMGSYTDKOQf41xYZyqv89uWvZeoqjoPqtd06DzePOoIe6jOkOeLf fE8ICN2EfUAjRuaIE1BhHlyzaU1if0w1TiDUaIwnwPv/zG8SrgSPCX5tdnR/KxJ95VCU KvWF8qMuLXZteJWxgsgcO5PnFCJ3IBf+1qh6WnDq0m5wuklGC9VqLs30jxZuELHkbWmY 5g4OpDIB0x8V22e8snbQiN/NTsneI+TwavFC1wZOoI4dzvWgy3L5GfgPdk49rRzmU+IH 3yWw== X-Gm-Message-State: APjAAAUHOY90Kp4CjSREiC4wSLYssWbVbsM0zgwT6FN3XdYQWFxbKkop ZvuzNojiWb8gtLY1jHg6r2I= X-Received: by 2002:a05:6830:51:: with SMTP id d17mr15907007otp.178.1556030869423; Tue, 23 Apr 2019 07:47:49 -0700 (PDT) Received: from madhuleo ([2605:6000:1023:606d:fd8f:ea25:f4b2:9189]) by smtp.gmail.com with ESMTPSA id w10sm6965565oiw.48.2019.04.23.07.47.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Apr 2019 07:47:47 -0700 (PDT) From: Madhumitha Prabakaran To: eric@anholt.net, stefan.wahren@i2se.com, gregkh@linuxfoundation.org, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Madhumitha Prabakaran Subject: [PATCH v3] Staging: vc04_services: Cleanup in ctrl_set_bitrate() Date: Tue, 23 Apr 2019 09:47:45 -0500 Message-Id: <20190423144745.21474-1-madhumithabiw@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary variable from the function and make a corresponding change w.r.t the variable. In addition to that align the parameters in the parentheses to maintain Linux kernel coding style Issue suggested by Coccinelle. Signed-off-by: Madhumitha Prabakaran --- Changes in v2 - 1) Fix my own error of removing function call from the variable. 2) Align the function parameters with parentheses. Changes in v3 - 1) Since there was no real purpose of returning true value, replace it with return value of the function vchiq_mmal_port_parameter_set(). --- drivers/staging/vc04_services/bcm2835-camera/controls.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index e39ab5fae724..2e0a422cdf3e 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -607,18 +607,15 @@ static int ctrl_set_bitrate(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { - int ret; struct vchiq_mmal_port *encoder_out; dev->capture.encode_bitrate = ctrl->val; encoder_out = &dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->output[0]; - ret = vchiq_mmal_port_parameter_set(dev->instance, encoder_out, - mmal_ctrl->mmal_id, - &ctrl->val, sizeof(ctrl->val)); - ret = 0; - return ret; + return vchiq_mmal_port_parameter_set(dev->instance, encoder_out, + mmal_ctrl->mmal_id, &ctrl->val, + sizeof(ctrl->val)); } static int ctrl_set_bitrate_mode(struct bm2835_mmal_dev *dev, -- 2.17.1