Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp499598pxb; Wed, 13 Apr 2022 06:43:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvxPyIF4eV3bt9E5ZXxnR/m5tQFo/p7amQnZCSVHVxfuCWwzdV2LGD35HfQ3Ky70wXa1VC X-Received: by 2002:a05:6402:4414:b0:419:28bc:55dc with SMTP id y20-20020a056402441400b0041928bc55dcmr44297248eda.130.1649857424245; Wed, 13 Apr 2022 06:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649857424; cv=none; d=google.com; s=arc-20160816; b=PvAFyW3ev/9+PPscIhtRqc/BF57bghiBsCh/yA9oWNUnOy4YmJi5uj2GMjf+EW1sJq GMQv96fq97zSgnjU0v5NweioEqG1o+6OCgdFP2HsfAqZFH6zVV640X7IrgRGtjyMrwFN GI08CZE6PtSoYcVj0R+6wDQZ19v2A/Qr6HA/SauWnQfm7Id2al0beGMhQoRMAIvFdjRf wsnx8W/twmdI/HfEl0tH1kEMi5goRPBTmp5r6uQj4dGkiKNNLYWzFRlyLFjeAs/m9gxA ha3JiOAqq0ju9Cff27FgvREBseyKzRh9ET//P+JiP6Z2mu1mzDsMjNYQToYpjmQ+MtyE 9spQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=PMpKw/8qdBQfrItEV05VGyxC4ciZaKh4yI/Y2XQ6d40=; b=bwBroJ312s5q6q6kTf0Vnk7WDZYPnScSIYcLZG02PKxJDVKNhXDWM2sH5CM3H/9C4j RPE5SHL77XoliQxyxAjDpWJb4YotnB+DmZ3Tvelal+x12j+NM15c5HOY5L0/Sfwjxu06 8akOEMDOGO/OKOMAmit5oKOZYW2bUHE2v0rNk4LGEb1pEYgrXulsm+E+5HH/68vxw2pk 51npRWtopqlr9AMdEguOF63IGHSHtfRUPXle3lYf76DtD+CzMpm1lw6Sa3tuTiaglXSW AYKy++dTD8GY7DVXQSmQhstmQ64NSUKYysQ4OT1dVNisPypN4AoDO4WwYFKvYjABhM8Z cz+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=AEjL1Uqh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id la3-20020a170907780300b006e80a81a548si11220268ejc.832.2022.04.13.06.43.17; Wed, 13 Apr 2022 06:43:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=AEjL1Uqh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231886AbiDMGSp (ORCPT + 99 others); Wed, 13 Apr 2022 02:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbiDMGSn (ORCPT ); Wed, 13 Apr 2022 02:18:43 -0400 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A510252B14 for ; Tue, 12 Apr 2022 23:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=PMpKw/8qdBQfrItEV05VGyxC4ciZaKh4yI/Y2XQ6d40=; b=AEjL1UqhV2QCBIccBzRCaePDLTvzjw/AcUR43HcS5xpDhvHINW/qRMyT JpN8BIHfqqmJUsBbz9SW3BfPUXebxQ9z45cFvT2b0lDaNpZoUB+41AqU3 WzxdTQBILtP1RdwobjZUkrZQ8PcADorEv6oyjrQ+anWFpUIuz9EGA2K0G A=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.90,256,1643670000"; d="scan'208";a="11356775" Received: from 203.107.68.85.rev.sfr.net (HELO hadrien) ([85.68.107.203]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 08:16:20 +0200 Date: Wed, 13 Apr 2022 08:16:20 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: "Fabio M. De Francesco" cc: johan@kernel.org, Jaehee Park , elder@kernel.org, gregkh@linuxfoundation.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: Re: [PATCH v2 2/2] staging: greybus: remove unneeded return In-Reply-To: <5792471.alqRGMn8q6@leap> Message-ID: References: <5792471.alqRGMn8q6@leap> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-929786816-1649830581=:3470" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-929786816-1649830581=:3470 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Tue, 12 Apr 2022, Fabio M. De Francesco wrote: > On marted? 12 aprile 2022 21:59:15 CEST Jaehee Park wrote: > > An empty function with void return type does not need an explicit > > return. Issue found by checkpatch. > > > > Signed-off-by: Jaehee Park > > --- > > drivers/staging/greybus/audio_codec.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/ > greybus/audio_codec.c > > index 0f50d1e51e2c..3e3a16568def 100644 > > --- a/drivers/staging/greybus/audio_codec.c > > +++ b/drivers/staging/greybus/audio_codec.c > > @@ -1032,7 +1032,6 @@ static int gbcodec_probe(struct snd_soc_component > *comp) > > static void gbcodec_remove(struct snd_soc_component *comp) > > { > > /* Empty function for now */ > > - return; > > } > > > > static int gbcodec_write(struct snd_soc_component *comp, unsigned int > reg, > > -- > > 2.25.1 > > > Hi Jaehee, > > If I recall it correctly, Dan Carpenter suggested to remove this empty > function. > > When developers remove lines of code from a function which becomes empty > after the removals, they also remove the resulting empty function and > delete all the calls (if there are any left) at the same time. It's probably not relevant in this case, but the function could be needed if it is a branch of an ifdef. Also if it is stored in a structure field and the user of the structure does not check for NULL. julia --8323329-929786816-1649830581=:3470--