Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp57019pxb; Tue, 12 Apr 2022 16:42:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8Vh9EAJv7yNfkHUjWbAwGaOs3T25383NFTPp/k5OhUxpXT+w1LZpdFw6YNwpJXjhEQNxc X-Received: by 2002:a17:902:d714:b0:153:2e9:3bcc with SMTP id w20-20020a170902d71400b0015302e93bccmr40131797ply.83.1649806950244; Tue, 12 Apr 2022 16:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649806950; cv=none; d=google.com; s=arc-20160816; b=HqLqV2Mt7K+tmfRAumn0Tx5BK9Wt2B5dqgaaJPXeAJVseX9eb4b2BPBjV373Rq3cXi lJQLn9c7Py5XOdNWo4gucX/4w/wXOpb9ou1DKBPwHdX/3ynZp75xK4tkoKjbql+TCDoa M0hSwOpepc4tZcgHmep6X/dOE5f3WpmhB48SHsJd5HOnKGsBHUYfTeqDV/iP1K74bwNN kINChJsSMyfVklls4P0pCBld0oZSwamztaeOvDeVRdW0YreMP/G44/eF8vNrwfftzNLk Xliady4V6BzpcCqaDtqywBGgcjD6Cdm5n16hK+JVXLv197FxAHZTEXzZogsRknhEJaNd jfFA== 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=Bkffw/tORnlmhR+gIFgr3oGerYveSodb4qpEBRE6/iA=; b=MybIn4PLK3emPiyYu/DvwGkyXO3RfSJGXhWI4UcAdRzqob9hMh2xDPbWTJ7FOvtMlk dKuOpepBxQHOlUqTVC4pSFj2bgd9AFncCADzktBlCxQPQGj2qK5Iqe4Qi8BdyIzQFxyM PDLUJ4KBYwVNIr++749DcixrFydGgnlu0JFESEUAuCxO8H8x6C5TpiKfghJB4U2ZkNxn gGg8v80Tjrgg/8lAYY9FnmImtMK4K+fF/l6iUGSZv3SeXXWRTkXACNlOPkIFq85ivE/3 WhSMH2gz196wDjVhzn0L7dJKXZhVKnymR/zRIDBiqqniQdmbHdI7qwCuH4NTelcumWLd aeZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=NN5omO0m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id lk12-20020a17090b33cc00b001c68e9e0e68si17160200pjb.36.2022.04.12.16.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:42:30 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=NN5omO0m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42ABB1C7BB3; Tue, 12 Apr 2022 14:34:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381142AbiDLIXN (ORCPT + 99 others); Tue, 12 Apr 2022 04:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353758AbiDLHZx (ORCPT ); Tue, 12 Apr 2022 03:25:53 -0400 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769842190 for ; Tue, 12 Apr 2022 00:04:10 -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=Bkffw/tORnlmhR+gIFgr3oGerYveSodb4qpEBRE6/iA=; b=NN5omO0mJWMWo28GRM27ZTIEsCMWZZQfcFvGkzizYwguhHUhVxh/oz2M I0hjb6s+ioxXL/zpOYfpsmt8FUiyozS69m89vwlzL4qOhSGGpIS7I03u8 q97rx4H8YhWxSCqrEyeAyxTkfdKI0H3RIwAvKaND2RkFYJ6rvUEgwOGzL 0=; Authentication-Results: mail2-relais-roc.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,253,1643670000"; d="scan'208";a="31248913" Received: from 203.107.68.85.rev.sfr.net (HELO hadrien) ([85.68.107.203]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 09:04:09 +0200 Date: Tue, 12 Apr 2022 09:04:08 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Jaehee Park cc: johan@kernel.org, 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 2/2] staging: greybus: remove return in an empty void function In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, 11 Apr 2022, Jaehee Park wrote: > Issue found by checkpatch: > WARNING: void function return statements are not generally useful Even for a simple change, it wouldbe better to follow the model that the subject line should concisely orient the reader (eg "remove unneeded return") and the log message should give a more complete description. Simply repeating what checkpatch tells you is rarely a good idea. It says what the problem is in a general way, whereas you should be explaining the reasoning behind your fix in a specific case. Here you could say that an empty function with void return type does not need an explicit return, and that the problem was detected with checkpatch. julia > > 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 > > >