lkml.org 
[lkml]   [2023]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 4/6] bus: fsl-mc: fsl-mc-allocator: Improve error reporting
Hello,

On Thu, Jun 08, 2023 at 10:00:13PM +0000, Leo Li wrote:
> > Hmm, clang seems to be right, and I just confirmed that gcc (arm-linux-
> > gnueabihf-gcc (Debian 12.2.0-14) 12.2.0) doesn't emit a warning. :-\
> >
> > My approach would be:
> >
> > diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-
> > allocator.c
> > index 0ad68099684e..991273f956ce 100644
> > --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c
> > +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> > @@ -103,14 +103,15 @@ static int __must_check
> > fsl_mc_resource_pool_remove_device(struct fsl_mc_device
> > struct fsl_mc_resource *resource;
> > int error = -EINVAL;
> >
> > + mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
> > + mc_bus = to_fsl_mc_bus(mc_bus_dev);
> > +
> > resource = mc_dev->resource;
> > if (!resource || resource->data != mc_dev) {
> > dev_err(&mc_bus_dev->dev, "resource mismatch\n");
> > goto out;
> > }
> >
> > - mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
> > - mc_bus = to_fsl_mc_bus(mc_bus_dev);
> > res_pool = resource->parent_pool;
> > if (res_pool != &mc_bus->resource_pools[resource->type]) {
> > dev_err(&mc_bus_dev->dev, "pool mismatch\n");
> >
> >
> > Should I prepare a proper patch, or is it possible to squash this change into
> > b3134039c5b3cf879841e3ec84c8cbf7675554ec?
> >
> > @Li Yang: Please advice.
>
> This looks fine. Please send a new patch and I can squash it to the original commit.

I did send a proper patch already, see

https://lore.kernel.org/all/20230605112025.80061-1-u.kleine-koenig@pengutronix.de

You can apply that on top of the broken commit, or if you prefer also
squash it into the offending commit. Note that in the above thread there
is another fix for an older commit.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-06-09 00:55    [W:0.475 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site