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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46FEBC433E7 for ; Wed, 14 Oct 2020 20:48:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E73F52224E for ; Wed, 14 Oct 2020 20:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730331AbgJNUsj (ORCPT ); Wed, 14 Oct 2020 16:48:39 -0400 Received: from smtprelay0239.hostedemail.com ([216.40.44.239]:56500 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727413AbgJNUsj (ORCPT ); Wed, 14 Oct 2020 16:48:39 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 6EB9618224D68; Wed, 14 Oct 2020 20:48:38 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: fan01_4617e032720e X-Filterd-Recvd-Size: 2449 Received: from XPS-9350 (cpe-72-134-80-165.natsow.res.rr.com [72.134.80.165]) (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA; Wed, 14 Oct 2020 20:48:37 +0000 (UTC) Message-ID: <8aff1623d069f37e089c5dcc7fb3fa00c272a886.camel@perches.com> Subject: Re: [PATCH 0/2] module: some refactoring in module_sig_check() From: Joe Perches To: Sergey Shtylyov , Jessica Yu , linux-kernel@vger.kernel.org Date: Wed, 14 Oct 2020 13:48:36 -0700 In-Reply-To: References: <789a4e5c-8efd-bb1c-86e2-eed8b2b7b0af@omprussia.ru> <3897a8ce5760affa304952c2d30c1266589407f2.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-10-14 at 22:44 +0300, Sergey Shtylyov wrote: > On 10/14/20 11:35 AM, Joe Perches wrote: > > [...] > > > > > Here are 2 patches against the 'modules-next' branch of Jessica Yu's 'linux.git' repo. > > > > > I'm doing some little refactoring in module_sig_check()... > > > > > > > > > > [1/2] module: merge repetitive strings in module_sig_check() > > > > > [2/2] module: unindent comments in module_sig_check() > > > > > > > > I think this code is rather cryptic and could be made clearer. > > > > > > > > How about: > > > > --- > > > > kernel/module.c | 51 ++++++++++++++++++++++++++------------------------- > > > > 1 file changed, 26 insertions(+), 25 deletions(-) > > > > > > Looks good. Do you want to post complete patch(es)? :-) > > > > I don't like posting actual patches on top of other people. > > It's a complete and compilable diff, it's just unsigned. > > It does too many things simultaneously, I'll need to decompose it... > > > If you want a Signed-off-by: here's one: > > > > Signed-off-by: Joe Perches > > I think I'll rather use Suggested-by: where appropriate... I don't think it does too many things and I'm not a big fan of micro-patches, but no worries, do what you want to it. I just thought the code poor and a bit unreadable given the internal goto in a switch/case block.