From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46F13C3527B for ; Tue, 12 Apr 2022 08:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381164AbiDLIXO (ORCPT ); Tue, 12 Apr 2022 04:23:14 -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 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 > > >