LKML Archive mirror
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>,
	"Franziska Naepelt" <franziska.naepelt@googlemail.com>,
	<keyrings@vger.kernel.org>
Cc: <dhowells@redhat.com>, <dwmw2@infradead.org>,
	<linux-kernel@vger.kernel.org>,
	"Franziska Naepelt" <franziska.naepelt@gmail.com>,
	"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH v2] certs/extract-cert: Fix checkpatch issues
Date: Tue, 06 Jun 2023 15:47:37 +0300	[thread overview]
Message-ID: <CT5KUK24BARQ.12FJ90WR1XUAX@suppilovahvero> (raw)
In-Reply-To: <CT5KS2NGSH54.58733YDNW3K0@suppilovahvero>

On Tue Jun 6, 2023 at 3:44 PM EEST, Jarkko Sakkinen wrote:
> On Tue Jun 6, 2023 at 3:38 PM EEST, Jarkko Sakkinen wrote:
> > On Fri Jun 2, 2023 at 11:59 AM EEST, Franziska Naepelt wrote:
> > > The following issues are fixed:
> > > - WARNING: Missing or malformed SPDX-License-Identifier tag
> > > - ERROR: trailing statements should be on next line
> > > - WARNING: braces {} are not necessary for single statement blocks
> > > - ERROR: space required before the open parenthesis '('
> > > - ERROR: code indent should use tabs where possible
> > > - WARNING: please, no spaces at the start of a line
> > > - WARNING: Missing a blank line after declarations
> > >
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202306021040.UTvXfH5J-lkp@intel.com/
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202306021102.zQU95cMI-lkp@intel.com/
> > >
> >
> > Remove the empty line.
> >
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com>
> >
> > Fixes tag?
> >
> > > ---
> > > v2:
> > >  - revert noreturn changes to fix build issues
> > > ---
> > >  certs/extract-cert.c | 10 +++++++---
> > >  1 file changed, 7 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/certs/extract-cert.c b/certs/extract-cert.c
> > > index 70e9ec89d87d..96c0728bf4d1 100644
> > > --- a/certs/extract-cert.c
> > > +++ b/certs/extract-cert.c
> > > @@ -1,3 +1,4 @@
> > > +// SPDX-License-Identifier: LGPL-2.1
> > >  /* Extract X.509 certificate in DER form from PKCS#11 or PEM.
> > >   *
> > >   * Copyright © 2014-2015 Red Hat, Inc. All Rights Reserved.
> > > @@ -63,7 +64,8 @@ static void drain_openssl_errors(void)
> > >
> > >  	if (ERR_peek_error() == 0)
> > >  		return;
> > > -	while (ERR_get_error_line(&file, &line)) {}
> > > +	while (ERR_get_error_line(&file, &line))
> > > +		;
> > >  }
> > >
> > >  #define ERR(cond, fmt, ...)				\
> > > @@ -73,7 +75,7 @@ static void drain_openssl_errors(void)
> > >  		if (__cond) {				\
> > >  			err(1, fmt, ## __VA_ARGS__);	\
> > >  		}					\
> > > -	} while(0)
> > > +	} while (0)
> > >
> > >  static const char *key_pass;
> > >  static BIO *wb;
> > > @@ -107,7 +109,7 @@ int main(int argc, char **argv)
> > >  	if (verbose_env && strchr(verbose_env, '1'))
> > >  		verbose = true;
> > >
> > > -        key_pass = getenv("KBUILD_SIGN_PIN");
> > > +	key_pass = getenv("KBUILD_SIGN_PIN");
> > >
> > >  	if (argc != 3)
> > >  		format();
> > > @@ -118,6 +120,7 @@ int main(int argc, char **argv)
> > >  	if (!cert_src[0]) {
> > >  		/* Invoked with no input; create empty file */
> > >  		FILE *f = fopen(cert_dst, "wb");
> > > +
> > >  		ERR(!f, "%s", cert_dst);
> > >  		fclose(f);
> > >  		exit(0);
> > > @@ -155,6 +158,7 @@ int main(int argc, char **argv)
> > >  			x509 = PEM_read_bio_X509(b, NULL, NULL, NULL);
> > >  			if (wb && !x509) {
> > >  				unsigned long err = ERR_peek_last_error();
> > > +
> > >  				if (ERR_GET_LIB(err) == ERR_LIB_PEM &&
> > >  				    ERR_GET_REASON(err) == PEM_R_NO_START_LINE) {
> > >  					ERR_clear_error();
> > >
> > > base-commit: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
> > > --
> > > 2.39.2 (Apple Git-143)
> >
> > IMHO should be split to separate commits with fixes tags for
> > trackability sake.
> >
> > My guess is that fixes tag is missing because this commit is
> > bundling a pile of stuff.
>
> Why? I mean I do get it might sound cutting hairs, so here's a
> big longer explanation.
>
> When you look up for a victim commit for a bug that actually screws up
> run-time behaviour in a way or another, exactly these "random selection
> of fixes" really can make you use an inappropriate vocabulary, and you
> *really* have to meditate not to spill that garbage online :-)
>
> Exactly because of this carefully localized fixes are very important.
> If you don't do it, your fix is counter-productive for the codebase
> IMHO.

... not to mention downstream distribution kernels. We maintain upstream
and do not obviously proactively support downstream *but* at the same
time we probably do not want to make backporting bug fixes more
difficult than it is necessary.

BR, Jarkko

  reply	other threads:[~2023-06-06 12:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 19:05 [PATCH] certs/extract-cert: Fix checkpatch issues Franziska Naepelt
2023-06-02  2:27 ` kernel test robot
2023-06-02  3:09 ` kernel test robot
2023-06-02  8:59 ` [PATCH v2] " Franziska Naepelt
2023-06-06 12:28   ` Bagas Sanjaya
2023-06-06 13:38     ` Dan Carpenter
2023-06-06 14:51       ` Jarkko Sakkinen
2023-06-06 15:25         ` Dan Carpenter
2023-06-06 16:03           ` Jarkko Sakkinen
2023-06-06 17:59             ` Franziska Näpelt
2023-06-06 18:29               ` Dan Carpenter
2023-06-06 21:43           ` Ben Boeckel
2023-06-07 16:11             ` Jarkko Sakkinen
2023-06-09 14:01         ` Dan Carpenter
2023-06-09 15:37           ` Jarkko Sakkinen
2023-06-09 15:43             ` Jarkko Sakkinen
2023-06-06 12:38   ` Jarkko Sakkinen
2023-06-06 12:44     ` Jarkko Sakkinen
2023-06-06 12:47       ` Jarkko Sakkinen [this message]
2023-06-06 14:44   ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CT5KUK24BARQ.12FJ90WR1XUAX@suppilovahvero \
    --to=jarkko@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=franziska.naepelt@gmail.com \
    --cc=franziska.naepelt@googlemail.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).