* [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check @ 2023-08-06 13:05 Atul Kumar Pant 2023-08-06 13:37 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Atul Kumar Pant @ 2023-08-06 13:05 UTC (permalink / raw) To: shubhrajyoti.datta, sai.krishna.potthuri, james.morse, mchehab, rric, bp, tony.luck, michal.simek Cc: Atul Kumar Pant, linux-edac, shuah, linux-kernel-mentees Updating the check of return value from edac_debugfs_create_dir to use IS_ERR. Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com> --- drivers/edac/zynqmp_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c index ac7d1e0b324c..cefbbafb945e 100644 --- a/drivers/edac/zynqmp_edac.c +++ b/drivers/edac/zynqmp_edac.c @@ -351,7 +351,7 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev) struct edac_priv *priv = edac_dev->pvt_info; priv->debugfs_dir = edac_debugfs_create_dir("ocm"); - if (!priv->debugfs_dir) + if (IS_ERR(priv->debugfs_dir)) return; edac_debugfs_create_x32("inject_fault_count", 0644, priv->debugfs_dir, -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check 2023-08-06 13:05 [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check Atul Kumar Pant @ 2023-08-06 13:37 ` Greg KH 2023-08-07 2:31 ` Atul Kumar Pant 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2023-08-06 13:37 UTC (permalink / raw) To: Atul Kumar Pant Cc: shubhrajyoti.datta, sai.krishna.potthuri, james.morse, mchehab, rric, bp, tony.luck, michal.simek, shuah, linux-kernel-mentees, linux-edac On Sun, Aug 06, 2023 at 06:35:14PM +0530, Atul Kumar Pant wrote: > Updating the check of return value from edac_debugfs_create_dir > to use IS_ERR. > > Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com> > --- > drivers/edac/zynqmp_edac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c > index ac7d1e0b324c..cefbbafb945e 100644 > --- a/drivers/edac/zynqmp_edac.c > +++ b/drivers/edac/zynqmp_edac.c > @@ -351,7 +351,7 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev) > struct edac_priv *priv = edac_dev->pvt_info; > > priv->debugfs_dir = edac_debugfs_create_dir("ocm"); > - if (!priv->debugfs_dir) > + if (IS_ERR(priv->debugfs_dir)) > return; Again, not correct, sorry. Please do not make these types of changes. Why do you feel this is needed at all? thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check 2023-08-06 13:37 ` Greg KH @ 2023-08-07 2:31 ` Atul Kumar Pant 2023-08-07 6:01 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Atul Kumar Pant @ 2023-08-07 2:31 UTC (permalink / raw) To: Greg KH Cc: shubhrajyoti.datta, sai.krishna.potthuri, james.morse, mchehab, rric, bp, tony.luck, michal.simek, shuah, linux-kernel-mentees, linux-edac On Sun, Aug 06, 2023 at 03:37:01PM +0200, Greg KH wrote: > On Sun, Aug 06, 2023 at 06:35:14PM +0530, Atul Kumar Pant wrote: > > Updating the check of return value from edac_debugfs_create_dir > > to use IS_ERR. > > > > Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com> > > --- > > drivers/edac/zynqmp_edac.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c > > index ac7d1e0b324c..cefbbafb945e 100644 > > --- a/drivers/edac/zynqmp_edac.c > > +++ b/drivers/edac/zynqmp_edac.c > > @@ -351,7 +351,7 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev) > > struct edac_priv *priv = edac_dev->pvt_info; > > > > priv->debugfs_dir = edac_debugfs_create_dir("ocm"); > > - if (!priv->debugfs_dir) > > + if (IS_ERR(priv->debugfs_dir)) > > return; > > Again, not correct, sorry. Please do not make these types of changes. > > Why do you feel this is needed at all? > edac_debugfs_create_dir uses debugfs_create_dir that return ERR_PTR. Hence to check the return value by this function I changed null comparison with IS_ERR. > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check 2023-08-07 2:31 ` Atul Kumar Pant @ 2023-08-07 6:01 ` Greg KH 2023-08-15 20:35 ` Atul Kumar Pant 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2023-08-07 6:01 UTC (permalink / raw) To: Atul Kumar Pant Cc: shubhrajyoti.datta, sai.krishna.potthuri, james.morse, mchehab, rric, bp, tony.luck, michal.simek, shuah, linux-kernel-mentees, linux-edac On Mon, Aug 07, 2023 at 08:01:04AM +0530, Atul Kumar Pant wrote: > On Sun, Aug 06, 2023 at 03:37:01PM +0200, Greg KH wrote: > > On Sun, Aug 06, 2023 at 06:35:14PM +0530, Atul Kumar Pant wrote: > > > Updating the check of return value from edac_debugfs_create_dir > > > to use IS_ERR. > > > > > > Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com> > > > --- > > > drivers/edac/zynqmp_edac.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c > > > index ac7d1e0b324c..cefbbafb945e 100644 > > > --- a/drivers/edac/zynqmp_edac.c > > > +++ b/drivers/edac/zynqmp_edac.c > > > @@ -351,7 +351,7 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev) > > > struct edac_priv *priv = edac_dev->pvt_info; > > > > > > priv->debugfs_dir = edac_debugfs_create_dir("ocm"); > > > - if (!priv->debugfs_dir) > > > + if (IS_ERR(priv->debugfs_dir)) > > > return; > > > > Again, not correct, sorry. Please do not make these types of changes. > > > > Why do you feel this is needed at all? > > > edac_debugfs_create_dir uses debugfs_create_dir that return ERR_PTR. > Hence to check the return value by this function I changed null > comparison with IS_ERR. But that's not needed at all, right? As this check has not ever really worked, why check it at all? greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check 2023-08-07 6:01 ` Greg KH @ 2023-08-15 20:35 ` Atul Kumar Pant 0 siblings, 0 replies; 5+ messages in thread From: Atul Kumar Pant @ 2023-08-15 20:35 UTC (permalink / raw) To: Greg KH Cc: shubhrajyoti.datta, sai.krishna.potthuri, james.morse, mchehab, rric, bp, tony.luck, michal.simek, shuah, linux-kernel-mentees, linux-edac On Mon, Aug 07, 2023 at 08:01:56AM +0200, Greg KH wrote: > On Mon, Aug 07, 2023 at 08:01:04AM +0530, Atul Kumar Pant wrote: > > On Sun, Aug 06, 2023 at 03:37:01PM +0200, Greg KH wrote: > > > On Sun, Aug 06, 2023 at 06:35:14PM +0530, Atul Kumar Pant wrote: > > > > Updating the check of return value from edac_debugfs_create_dir > > > > to use IS_ERR. > > > > > > > > Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com> > > > > --- > > > > drivers/edac/zynqmp_edac.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c > > > > index ac7d1e0b324c..cefbbafb945e 100644 > > > > --- a/drivers/edac/zynqmp_edac.c > > > > +++ b/drivers/edac/zynqmp_edac.c > > > > @@ -351,7 +351,7 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev) > > > > struct edac_priv *priv = edac_dev->pvt_info; > > > > > > > > priv->debugfs_dir = edac_debugfs_create_dir("ocm"); > > > > - if (!priv->debugfs_dir) > > > > + if (IS_ERR(priv->debugfs_dir)) > > > > return; > > > > > > Again, not correct, sorry. Please do not make these types of changes. > > > > > > Why do you feel this is needed at all? > > > > > edac_debugfs_create_dir uses debugfs_create_dir that return ERR_PTR. > > Hence to check the return value by this function I changed null > > comparison with IS_ERR. > > But that's not needed at all, right? > > As this check has not ever really worked, why check it at all? I'll fix this in a new patch > > greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-15 20:36 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-06 13:05 [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check Atul Kumar Pant 2023-08-06 13:37 ` Greg KH 2023-08-07 2:31 ` Atul Kumar Pant 2023-08-07 6:01 ` Greg KH 2023-08-15 20:35 ` Atul Kumar Pant
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox