Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668AbbKHWAI (ORCPT ); Sun, 8 Nov 2015 17:00:08 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58383 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbbKHWAE (ORCPT ); Sun, 8 Nov 2015 17:00:04 -0500 Subject: Re: [PATCH] dma: fix returnvar.cocci warnings To: "Daniel K." , Julia Lawall References: <563FC111.4060308@syse.no> Cc: agross@codeaurora.org, kbuild-all@01.org, dmaengine@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinod Koul , Dan Williams , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Sinan Kaya Message-ID: <563FC5E0.8030301@codeaurora.org> Date: Sun, 8 Nov 2015 17:00:00 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <563FC111.4060308@syse.no> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1367 Lines: 45 On 11/8/2015 4:39 PM, Daniel K. wrote: > On 11/08/2015 07:45 AM, Julia Lawall wrote: >> Remove unneeded variable used to store return value. >> >> --- a/drivers/dma/qcom/hidma_ll.c >> +++ b/drivers/dma/qcom/hidma_ll.c >> @@ -567,14 +567,13 @@ int hidma_ll_resume(struct hidma_lldev * >> >> static int hidma_ll_hw_start(struct hidma_lldev *lldev) >> { >> - int rc = 0; >> unsigned long irqflags; >> >> spin_lock_irqsave(&lldev->lock, irqflags); >> writel(lldev->tre_write_offset, lldev->trca + TRCA_DOORBELL_OFFSET); >> spin_unlock_irqrestore(&lldev->lock, irqflags); >> >> - return rc; >> + return 0; >> } >> >> bool hidma_ll_isenabled(struct hidma_lldev *lldev) > > Seems rather pointless, what about 'static void ...' and dropping the > return statement? > > > Daniel K. > Yes, that's what I ended up doing. rc was forgotten there because I had to restructure code to use the issue_pending API. -- Sinan Kaya Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/