On Tue, Sep 16, 2025 at 08:58:35AM +0100, Lee Jones wrote:
> On Fri, 12 Sep 2025, Nathan Chancellor wrote:
> > > The following changes since commit
> > > 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
> > >
> > > Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
...
> > > Qunqin Zhao (4):
> > ...
> > > tpm: Add a driver for Loongson TPM device
> >
> > This one needs a fix up due to commit 07d8004d6fb9 ("tpm: add bufsiz
> > parameter in the .send callback") in 6.17-rc1, as I am seeing the
> > following error in next-20250912.
> >
> > drivers/char/tpm/tpm_loongson.c:48:17: error: initialization of 'int
> > (*)(struct tpm_chip *, u8 *, size_t, size_t)' {aka 'int (*)(struct
> > tpm_chip *, unsigned char *, long unsigned int, long unsigned int)'} from
> > incompatible pointer type 'int (*)(struct tpm_chip *, u8 *, size_t)' {aka
> > 'int (*)(struct tpm_chip *, unsigned char *, long unsigned int)'}
> > [-Wincompatible-pointer-types]
> > 48 | .send = tpm_loongson_send,
> > | ^~~~~~~~~~~~~~~~~
> > drivers/char/tpm/tpm_loongson.c:48:17: note: (near initialization for
> > 'tpm_loongson_ops.send')
> > drivers/char/tpm/tpm_loongson.c:31:12: note: 'tpm_loongson_send' declared
> > here
> > 31 | static int tpm_loongson_send(struct tpm_chip *chip, u8 *buf,
> > size_t count)
> > | ^~~~~~~~~~~~~~~~~
> >
> > Can you squash it or do you want a separate patch?
> >
> > Cheers,
> > Nathan
> >
> > diff --git a/drivers/char/tpm/tpm_loongson.c
> > b/drivers/char/tpm/tpm_loongson.c
> > index a4ec23639911..9e50250763d1 100644
> > --- a/drivers/char/tpm/tpm_loongson.c
> > +++ b/drivers/char/tpm/tpm_loongson.c
> > @@ -28,7 +28,7 @@ static int tpm_loongson_recv(struct tpm_chip *chip, u8
> > *buf, size_t count)
> > return cmd_ret->data_len;
> > }
> >
> > -static int tpm_loongson_send(struct tpm_chip *chip, u8 *buf, size_t count)
> > +static int tpm_loongson_send(struct tpm_chip *chip, u8 *buf, size_t
> > bufsiz, size_t count)
> > {
> > struct loongson_se_engine *tpm_engine = dev_get_drvdata(&chip->dev);
> > struct tpm_loongson_cmd *cmd = tpm_engine->command;
>
> This will break my local branch.
>
> Any chance of an immutable pull-request for:
>
> 07d8004d6fb9 ("tpm: add bufsiz parameter in the .send callback")
I might be missing something but this commit is in Linux 6.17-rc1, which
this tree is based on according to both 'git log' and the lead in to
your pull request at the top, so your local branch is already broken.
That error message was taken from the tip of your tree and the fix was
tested against it as well.
"tpm: Add a driver for Loongson TPM device" was sent back in early July,
so it was never updated for this conflict.
Cheers,
Nathan