mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Naik, Avadhut" <avadnaik@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>,
	Avadhut Naik <avadhut.naik@amd.com>,
	linux-edac@vger.kernel.org, john.allen@amd.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] EDAC/amd64: Incorporate DRAM Address in EDAC message
Date: Wed, 6 Aug 2025 16:37:09 -0500	[thread overview]
Message-ID: <080cf3e7-6422-4149-8c5c-f2a6762c385d@amd.com> (raw)
In-Reply-To: <20250806211524.GFaJPF7Bk2dooZOVzc@fat_crate.local>



On 8/6/2025 16:15, Borislav Petkov wrote:
> On Wed, Aug 06, 2025 at 04:08:07PM -0500, Naik, Avadhut wrote:
>>>> +			sprintf(s, "Cs: 0x%x Bank Grp: 0x%x Bank Addr: 0x%x"
>>>> +					   " Row: 0x%x Column: 0x%x"
>>>> +					   " RankMul: 0x%x SubChannel: 0x%x",
>>>
>>> There's a checkpatch warning here about splitting user-visible strings.
>>>
>>> Why not use scnprintf() or the like?
>>>
>> Had noticed the checkpatch warning initially.
>> IIRC, it was for splitting the quoted string across multiple lines.
>> Can use scnprintf here. But wont the warning still prevail?
> 
> Just do one long line. The idea is to be able to grep the code when you see
> the string issued in dmesg.
> 
Okay, sounds good! Will change it to something like below:

scnprintf(s, 100, "Cs: 0x%x Bank Grp: 0x%x Bank Addr: 0x%x Row: 0x%x Column: 0x%x RankMul: 0x%x SubChannel: 0x%x",
          err->dram_addr->chip_select,
          err->dram_addr->bank_group,
          err->dram_addr->bank_addr,
          err->dram_addr->row_addr,
          err->dram_addr->col_addr,
          err->dram_addr->rank_mul,
          err->dram_addr->sub_ch);

-- 
Thanks,
Avadhut Naik


  reply	other threads:[~2025-08-06 21:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 16:48 [PATCH 0/2] Incorporate DRAM address in EDAC messages Avadhut Naik
2025-07-17 16:48 ` [PATCH 1/2] RAS/AMD/ATL: Translate UMC normalized address to DRAM address using PRM Avadhut Naik
2025-07-28 14:40   ` Yazen Ghannam
2025-08-06 18:21     ` Naik, Avadhut
2025-07-17 16:48 ` [PATCH 2/2] EDAC/amd64: Incorporate DRAM Address in EDAC message Avadhut Naik
2025-07-28 15:14   ` Yazen Ghannam
2025-08-06 21:08     ` Naik, Avadhut
2025-08-06 21:15       ` Borislav Petkov
2025-08-06 21:37         ` Naik, Avadhut [this message]
2025-08-11 13:43       ` Yazen Ghannam

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=080cf3e7-6422-4149-8c5c-f2a6762c385d@amd.com \
    --to=avadnaik@amd.com \
    --cc=avadhut.naik@amd.com \
    --cc=bp@alien8.de \
    --cc=john.allen@amd.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yazen.ghannam@amd.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

all inboxes | Powered by JetHome®