Linux kernel updates and v6.0

Joel Stanley joel at jms.id.au
Thu Oct 6 19:37:38 AEDT 2022


On Thu, 6 Oct 2022 at 07:04, Quan Nguyen <quan at os.amperecomputing.com> wrote:
>
>
> >
> >> Please address any future patches to the dev-6.0 tree.
> >
> > If you have pending patches then please let me know that you want them
> > merged to the dev-6.0 branch. Otherwise, rebase and re-send them to
> > the list.
> >
>
> Hi Joel,
>
> Could you help to pick this patchset to the dev-6.0 branch ?
>
> https://lore.kernel.org/lkml/20221004093106.1653317-4-quan@os.amperecomputing.com/

I merged this but it caused a build error:

drivers/char/ipmi/ssif_bmc.c:864:27: error: initialization of ‘int
(*)(struct i2c_client *)’ from incompatible pointer type ‘void
(*)(struct i2c_client *)’ [-Werror=incompatible-pointer-types]
  864 |         .remove         = ssif_bmc_remove,
      |                           ^~~~~~~~~~~~~~~

I think in 6.1 the i2c drivers will return void in their remove
callbacks, but before then they still need to return an int. I have
updated your change with this patch:

--- a/drivers/char/ipmi/ssif_bmc.c
+++ b/drivers/char/ipmi/ssif_bmc.c
@@ -835,12 +835,14 @@ static int ssif_bmc_probe(struct i2c_client
*client, const struct i2c_device_id
        return ret;
 }

-static void ssif_bmc_remove(struct i2c_client *client)
+static int ssif_bmc_remove(struct i2c_client *client)
 {
        struct ssif_bmc_ctx *ssif_bmc = i2c_get_clientdata(client);

        i2c_slave_unregister(client);
        misc_deregister(&ssif_bmc->miscdev);
+
+       return 0;
 }

Cheers,

Joel


More information about the openbmc mailing list