From patchwork Tue Sep 6 22:52:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9318037 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DFA6560760 for ; Tue, 6 Sep 2016 23:08:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1B5C28F15 for ; Tue, 6 Sep 2016 23:08:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D501128F19; Tue, 6 Sep 2016 23:08:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2793428F15 for ; Tue, 6 Sep 2016 23:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936478AbcIFXIn (ORCPT ); Tue, 6 Sep 2016 19:08:43 -0400 Received: from condef001-v.nifty.com ([210.131.4.238]:36464 "EHLO condef001-v.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932133AbcIFXIm (ORCPT ); Tue, 6 Sep 2016 19:08:42 -0400 X-Greylist: delayed 362 seconds by postgrey-1.27 at vger.kernel.org; Tue, 06 Sep 2016 19:08:42 EDT Received: from conuserg-07.nifty.com ([10.26.8.70])by condef001-v.nifty.com with ESMTP id u86MubJe014984; Wed, 7 Sep 2016 07:56:37 +0900 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-07.nifty.com with ESMTP id u86MqUdS015204; Wed, 7 Sep 2016 07:52:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u86MqUdS015204 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473202357; bh=1hekZlZmPprbSJ4pB38YnWB37iivVOtIjp8LtwhjoZc=; h=From:To:Cc:Subject:Date:From; b=leDAehzIRK2iOsxL2X0+xGpEuLzrpbkTCkDoxlojhVWasG+bua/d7fm7ryq3w1pLP 3xsJSekhADbrdAvYm3E+u7lDOrtgI0Y4MpeGtg76YcvRNHK/dA9WfJzdX2JX1gycuk oMaBrores8whQBu2LZ+59ebFq/g90cgoidaI64zWNfRlgaP+c7Q28qH52ek30bhWWq otP5j4+kl0WDxWDaRdiFoFSqK/i047PKfW3vucdQGt3rPHM5Z6SQis4zfwEp4nYX2U WGYbpqiPpSfTRpFkDzU0ro0fEwGt9dqZZdZEbtOqbnUiQ4sNTXAJRujIrCCRLkzf9k XzX9mN8I4L1OA== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Masahiro Yamada , Shuah Khan , Kukjin Kim , Malcolm Priestley , linux-kernel@vger.kernel.org, Benoit Parrot , Jacek Anaszewski , Max Kellermann , linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Julia Lawall , Hans Verkuil , Abhilash Jindal , Michael Ira Krufky , Andrzej Pietrasiewicz Subject: [PATCH] [media] squash lines for simple wrapper functions Date: Wed, 7 Sep 2016 07:52:24 +0900 Message-Id: <1473202344-5218-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada --- drivers/media/dvb-core/dvb_frontend.c | 8 ++------ drivers/media/pci/meye/meye.c | 5 +---- drivers/media/pci/ttpci/av7110.c | 4 +--- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 17 +++-------------- drivers/media/platform/ti-vpe/cal.c | 6 +----- drivers/media/rc/fintek-cir.c | 6 +----- drivers/media/usb/dvb-usb-v2/lmedm04.c | 14 ++++++-------- drivers/media/usb/dvb-usb/m920x.c | 10 +++------- drivers/media/usb/gspca/jl2005bcd.c | 5 +---- drivers/media/usb/gspca/sq905c.c | 5 +---- 10 files changed, 20 insertions(+), 60 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index be99c8d..43fcbb8 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -1515,12 +1515,8 @@ static int dtv_set_frontend(struct dvb_frontend *fe); static bool is_dvbv3_delsys(u32 delsys) { - bool status; - - status = (delsys == SYS_DVBT) || (delsys == SYS_DVBC_ANNEX_A) || - (delsys == SYS_DVBS) || (delsys == SYS_ATSC); - - return status; + return (delsys == SYS_DVBT) || (delsys == SYS_DVBC_ANNEX_A) || + (delsys == SYS_DVBS) || (delsys == SYS_ATSC); } /** diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index ba887e8..7727d59 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c @@ -587,10 +587,7 @@ static void mchip_hic_stop(void) /* get the next ready frame from the dma engine */ static u32 mchip_get_frame(void) { - u32 v; - - v = mchip_read(MCHIP_MM_FIR(meye.mchip_fnum)); - return v; + return mchip_read(MCHIP_MM_FIR(meye.mchip_fnum)); } /* frees the current frame from the dma engine */ diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c index 382caf2..aee26af 100644 --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c @@ -2930,9 +2930,7 @@ static struct saa7146_extension av7110_extension_driver = { static int __init av7110_init(void) { - int retval; - retval = saa7146_register_extension(&av7110_extension_driver); - return retval; + return saa7146_register_extension(&av7110_extension_driver); } diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c index 0912d0a..a1d823a 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c @@ -178,20 +178,12 @@ void exynos4_jpeg_set_interrupt(void __iomem *base, unsigned int version) unsigned int exynos4_jpeg_get_int_status(void __iomem *base) { - unsigned int int_status; - - int_status = readl(base + EXYNOS4_INT_STATUS_REG); - - return int_status; + return readl(base + EXYNOS4_INT_STATUS_REG); } unsigned int exynos4_jpeg_get_fifo_status(void __iomem *base) { - unsigned int fifo_status; - - fifo_status = readl(base + EXYNOS4_FIFO_STATUS_REG); - - return fifo_status; + return readl(base + EXYNOS4_FIFO_STATUS_REG); } void exynos4_jpeg_set_huf_table_enable(void __iomem *base, int value) @@ -296,10 +288,7 @@ void exynos4_jpeg_set_encode_hoff_cnt(void __iomem *base, unsigned int fmt) unsigned int exynos4_jpeg_get_stream_size(void __iomem *base) { - unsigned int size; - - size = readl(base + EXYNOS4_BITSTREAM_SIZE_REG); - return size; + return readl(base + EXYNOS4_BITSTREAM_SIZE_REG); } void exynos4_jpeg_set_dec_bitstream_size(void __iomem *base, unsigned int size) diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index e967fcf..2a9de42 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -483,11 +483,7 @@ static void cal_get_hwinfo(struct cal_dev *dev) static inline int cal_runtime_get(struct cal_dev *dev) { - int r; - - r = pm_runtime_get_sync(&dev->pdev->dev); - - return r; + return pm_runtime_get_sync(&dev->pdev->dev); } static inline void cal_runtime_put(struct cal_dev *dev) diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index bd7b3bd..ecab69e 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -104,11 +104,7 @@ static inline void fintek_cir_reg_write(struct fintek_dev *fintek, u8 val, u8 of /* read val from cir config register */ static u8 fintek_cir_reg_read(struct fintek_dev *fintek, u8 offset) { - u8 val; - - val = inb(fintek->cir_addr + offset); - - return val; + return inb(fintek->cir_addr + offset); } /* dump current cir register contents */ diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 3721ee6..8a28e87 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -156,21 +156,19 @@ struct lme2510_state { static int lme2510_bulk_write(struct usb_device *dev, u8 *snd, int len, u8 pipe) { - int ret, actual_l; + int actual_l; - ret = usb_bulk_msg(dev, usb_sndbulkpipe(dev, pipe), - snd, len , &actual_l, 100); - return ret; + return usb_bulk_msg(dev, usb_sndbulkpipe(dev, pipe), + snd, len, &actual_l, 100); } static int lme2510_bulk_read(struct usb_device *dev, u8 *rev, int len, u8 pipe) { - int ret, actual_l; + int actual_l; - ret = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, pipe), - rev, len , &actual_l, 200); - return ret; + return usb_bulk_msg(dev, usb_rcvbulkpipe(dev, pipe), + rev, len, &actual_l, 200); } static int lme2510_usb_talk(struct dvb_usb_device *d, diff --git a/drivers/media/usb/dvb-usb/m920x.c b/drivers/media/usb/dvb-usb/m920x.c index eafc5c8..70672e1 100644 --- a/drivers/media/usb/dvb-usb/m920x.c +++ b/drivers/media/usb/dvb-usb/m920x.c @@ -55,13 +55,9 @@ static inline int m920x_read(struct usb_device *udev, u8 request, u16 value, static inline int m920x_write(struct usb_device *udev, u8 request, u16 value, u16 index) { - int ret; - - ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - request, USB_TYPE_VENDOR | USB_DIR_OUT, - value, index, NULL, 0, 2000); - - return ret; + return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), request, + USB_TYPE_VENDOR | USB_DIR_OUT, value, index, + NULL, 0, 2000); } static inline int m920x_write_seq(struct usb_device *udev, u8 request, diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c index 5b481fa..229c66a 100644 --- a/drivers/media/usb/gspca/jl2005bcd.c +++ b/drivers/media/usb/gspca/jl2005bcd.c @@ -300,10 +300,7 @@ static int jl2005c_stream_start_cif_small(struct gspca_dev *gspca_dev) static int jl2005c_stop(struct gspca_dev *gspca_dev) { - int retval; - - retval = jl2005c_write_reg(gspca_dev, 0x07, 0x00); - return retval; + return jl2005c_write_reg(gspca_dev, 0x07, 0x00); } /* diff --git a/drivers/media/usb/gspca/sq905c.c b/drivers/media/usb/gspca/sq905c.c index aa21edc..9eaed32 100644 --- a/drivers/media/usb/gspca/sq905c.c +++ b/drivers/media/usb/gspca/sq905c.c @@ -257,11 +257,8 @@ static void sd_stop0(struct gspca_dev *gspca_dev) /* this function is called at probe and resume time */ static int sd_init(struct gspca_dev *gspca_dev) { - int ret; - /* connect to the camera and reset it. */ - ret = sq905c_command(gspca_dev, SQ905C_CLEAR, 0); - return ret; + return sq905c_command(gspca_dev, SQ905C_CLEAR, 0); } /* Set up for getting frames. */