From patchwork Wed Oct 12 14:43:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9373311 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 4B4C960839 for ; Wed, 12 Oct 2016 14:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C77C29640 for ; Wed, 12 Oct 2016 14:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30FD92963A; Wed, 12 Oct 2016 14:44:10 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 CCB6029640 for ; Wed, 12 Oct 2016 14:44:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933772AbcJLOnq (ORCPT ); Wed, 12 Oct 2016 10:43:46 -0400 Received: from mout.web.de ([212.227.15.3]:61901 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933264AbcJLOnn (ORCPT ); Wed, 12 Oct 2016 10:43:43 -0400 Received: from [192.168.1.2] ([78.49.9.22]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0LtCm3-1asMTj2IZv-012lIT; Wed, 12 Oct 2016 16:43:28 +0200 Subject: [PATCH 08/34] [media] DaVinci-VPBE: Return the success indication only as a constant in vpbe_set_mode() To: linux-media@vger.kernel.org, Hans Verkuil , "Lad, Prabhakar" , Mauro Carvalho Chehab References: Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Wed, 12 Oct 2016 16:43:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:QRRHkV/4HXUTv+3iIQw3A87PbiD+9OTTgut8Mgwrv0jqxwvmvB2 Gv7DnBQJ5Af1GUvP6NQfWiPE9udbbrRWk9lsosfUkas0+7cuk+9rzsRkzMiFNDf7MePpr1o LvjeAASYUQlh3MVUYGabxNgY5DwOiarsnJnYBchJ5hJo1q8IrbLdrj4WqkHN+qSd8/YVscJ FnnRmsabDmKBlXr4mUbDg== X-UI-Out-Filterresults: notjunk:1; V01:K0:LwZwDf8vyQ0=:agjIONaOJFfRN73pBL8bqc IlFzzr/IPjyt7RIa/9DpA1EaH209kArwo57Vkdt0eem3lEv3SG0tKV8+Z8LJ5ZEHq2V2IxaJV H06wVSwiNX2TUGf2v81gdh0Gg2rp16Cb6orMm4HT/+8H3qKQE3SFtX0SKSGai8vHn3xiJZ+mE n1gCWGxY1IO+NExJa2gV+BS1F/BihcXaFgBAJB75mqGKlzryVJmLflfYiw6PL0akNKSrfaEho LiwQLbp781dVQ2rj4ZilZ06lnenou5VjbO97jOk2K0s6JnX3EvmO3Qa8y8hAKl9xA1eo24IKr 8/WcwuaoQa4cJrrReP9UtCuFlrOo94uVTQkJj8bTQrQJsIi4VFERd2jF/jS87N4D1BznbPVVS j898pvFD4uHMPhG2O6uqojPC10ZczSGmswnhUREJYDBjCn78kHlRDcBYWhI0GgC52LURvdrAh Cski99lqZlCEgg2NJJxL9AQS6MLRT+u2K1aG6HO3Ugr7IhjQa/geQTaO8C3v1J7a5ZSxIvQb6 ImfZYQuGZ+HywcDvmnrRqWvYXN8sG5HX84tY7VIjRBODxJ4atZaPDd5DSlFFD4yHfcBjWhx5J SoJrwA+fp/tzNPbt8STIL3XzcTpGh4T+lCWstk4R7ZwZj9O8EUjxNSuPtG4IatAX+RWyyu10d 7flgqf6TMec9KAJn37kGV8jSuyxRUXnX5WEQFXs3vAyvaE7dlNGNFEf5aRd0AkaTq3dJ+CCwY QKqTPDo4q0W5EeSmrJdgf54c2QPhxfbXReu1EZ/q65MTSPL3cGQPjJoAdxs4MtBoRif9FqvKj +k+v4wO Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 12 Oct 2016 09:51:29 +0200 * Return a success code without storing it in an intermediate variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/media/platform/davinci/vpbe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 9fdd8c0..d6a0221 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -509,7 +509,6 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev, struct v4l2_dv_timings dv_timings; struct osd_state *osd_device; int out_index = vpbe_dev->current_out_index; - int ret = 0; int i; if (!mode_info || !mode_info->name) @@ -549,8 +548,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev, vpbe_dev->current_timings.upper_margin); mutex_unlock(&vpbe_dev->lock); - - return ret; + return 0; } static int vpbe_set_default_mode(struct vpbe_device *vpbe_dev)