mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pei Xiao <xiaopei01@kylinos.cn>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>,
	peterhuewe@gmx.de, jgg@ziepe.ca, linux-integrity@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] tpm: fix log messages in tpm_init()
Date: Mon, 5 Oct 2026 14:10:56 +0800	[thread overview]
Message-ID: <d9824f03-1958-4e55-ab8d-092af2c69ba1@kylinos.cn> (raw)
In-Reply-To: <asM-ICLM-C0ADrAL@kernel.org>



在 2026/10/5 14:05, Jarkko Sakkinen 写道:
> On Mon, Oct 05, 2026 at 12:23:31PM +0800, Pei Xiao wrote:
>>
>>
>> 在 2026/10/5 11:46, Jarkko Sakkinen 写道:
>>> On Sat, Oct 03, 2026 at 04:27:55PM +0800, Pei Xiao wrote:
>>>> Make the error messages consistently prefixed with "tpm: ", and fix
>>>> the tpm_dev_common_init() failure message which was wrongly copied
>>>> from the previous step.
>>>>
>>>> Assisted-by: GLM-5.3
>>>> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
>>>> ---
>>>>  drivers/char/tpm/tpm-interface.c | 6 +++---
>>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
>>>> index 1ccdbde98b69..666a1c654c02 100644
>>>> --- a/drivers/char/tpm/tpm-interface.c
>>>> +++ b/drivers/char/tpm/tpm-interface.c
>>>> @@ -524,13 +524,13 @@ static int __init tpm_init(void)
>>>>  
>>>>  	rc = class_register(&tpm_class);
>>>>  	if (rc) {
>>>> -		pr_err("couldn't create tpm class\n");
>>>> +		pr_err("tpm: couldn't create tpm class\n");
>>>>  		return rc;
>>>>  	}
>>>>  
>>>>  	rc = class_register(&tpmrm_class);
>>>>  	if (rc) {
>>>> -		pr_err("couldn't create tpmrm class\n");
>>>> +		pr_err("tpm: couldn't create tpmrm class\n");
>>>>  		goto out_destroy_tpm_class;
>>>>  	}
>>>>  
>>>> @@ -542,7 +542,7 @@ static int __init tpm_init(void)
>>>>  
>>>>  	rc = tpm_dev_common_init();
>>>>  	if (rc) {
>>>> -		pr_err("tpm: failed to allocate char dev region\n");
>>>> +		pr_err("tpm: failed to allocate TPM workqueue\n");
>>>>  		goto out_unreg_chrdev;
>>>>  	}
>>>>  
>>>> -- 
>>>> 2.25.1
>>>>
>>>
>>> I NAK this one. It is not fixing anything.
>> Hmm, this is a cleanup, not a fix—just a very minor change to an error
>> log/print. I noticed it was duplicated (with the alloc_chrdev_region
>> error print), which made it impossible to tell which function call had
>> failed (it might actually never be executed). So I just brought up this
>> cleanup along the way.
> 
> If there is patch that is coming along the way, it is patch that should
> not be sent because:
> 
> 1. It wastes also everyone else's time.
> 2. Lack of understanding of cause and effect because by definition
>    you have no idea what you are submitting. E
> 
> Pure clean ups per se are already something that is usually best to NAK
> but this patch is not a clean up.
> 
> I mean the path is doing arbitrary log message changes. That is not
> harmless change as you enforce your arbitrary preferences also for few
> billion other users. 
OK, got it. Thanks.
> 
> Br, Jarkko


  reply	other threads:[~2026-10-05  6:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03  8:27 [PATCH 0/5] tpm: assorted fixes and cleanups Pei Xiao
2026-10-03  8:27 ` [PATCH 1/5] tpm: tpm_ppi: fix wrong error code returned to user space Pei Xiao
2026-10-05  4:16   ` Jarkko Sakkinen
2026-10-05  6:17     ` Pei Xiao
2026-10-05  7:42       ` Jarkko Sakkinen
2026-10-03  8:27 ` [PATCH 2/5] tpm: tpm_nsc: fix NULL pointer dereference on init failure Pei Xiao
2026-10-05  4:18   ` Jarkko Sakkinen
2026-10-03  8:27 ` [PATCH 3/5] tpm: tpm_nsc: stop using the cleanup callback as dev.release Pei Xiao
2026-10-05  4:19   ` Jarkko Sakkinen
2026-10-03  8:27 ` [PATCH 4/5] tpm: fix zero-length read discarding the pending response Pei Xiao
2026-10-05  5:11   ` Jarkko Sakkinen
2026-10-03  8:27 ` [PATCH 5/5] tpm: fix log messages in tpm_init() Pei Xiao
2026-10-05  3:46   ` Jarkko Sakkinen
2026-10-05  4:23     ` Pei Xiao
2026-10-05  6:05       ` Jarkko Sakkinen
2026-10-05  6:10         ` Pei Xiao [this message]
2026-10-05  6:11         ` Jarkko Sakkinen

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=d9824f03-1958-4e55-ab8d-092af2c69ba1@kylinos.cn \
    --to=xiaopei01@kylinos.cn \
    --cc=jarkko.sakkinen@iki.fi \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /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

all inboxes | Powered by JetHome®