lkml.org 
[lkml]   [2023]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] spi: remove return value check of debugfs_create_dir()
From
On 4/24/23 15:22, Greg Kroah-Hartman wrote:
> On Mon, Apr 24, 2023 at 03:17:09PM +0200, Peter Enderborg wrote:
>> On 4/24/23 14:53, Greg Kroah-Hartman wrote:
>>>>> We can do things with the debug information without filesystem enabled.
>>> What exactly do you mean by this?
>>>
>>>
>> We can read out data from kernel with a ramdumper and analyse with crash.
>>
>> See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/kernel_administration_guide/kernel_crash_dump_guide
>>
>> If it is useful or not I can not say, but the dws->regset. is lost and can not be read with a post mortem debugger.
> What is "dws"? What is "regset"?

That is from the patch. It is used as an example.


> What is the root problem here?

That it is a mater of taste.  It should not be a mater of taste.

      if (!dws->debugfs)
                return -ENOMEM;

        dws->regset.regs = dw_spi_dbgfs_regs;
        dws->regset.nregs = ARRAY_SIZE(dw_spi_dbgfs_regs);
        dws->regset.base = dws->regs;
        debugfs_create_regset32("registers", 0400, dws->debugfs, &dws->regset);

Even if it does not have a impact on the function of the driver, it has a impact on debugging that
is not needed.


> confused,
>
> greg k-h


\
 
 \ /
  Last update: 2023-04-24 17:35    [W:0.085 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site