Re: [PATCH 5/5] fpga: m10bmc-sec: switch show_canceled_csk() to using sysfs_emit()

From: Xu Yilun

Date: Wed Mar 25 2026 - 03:48:34 EST


On Tue, Mar 24, 2026 at 02:38:04PM -0400, Yury Norov wrote:
> On Tue, Mar 24, 2026 at 05:15:33PM +0800, Xu Yilun wrote:
> > On Tue, Mar 03, 2026 at 03:08:41PM -0500, Yury Norov wrote:
> > > Switch show_canceled_csk() to use the proper sysfs_emit("%*pbl").
> > >
> > > Reviewed-by: Russ Weight <russ.weight@xxxxxxxxx>
> > > Suggested-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> > > Signed-off-by: Yury Norov <ynorov@xxxxxxxxxx>
> > > ---
> > > drivers/fpga/intel-m10-bmc-sec-update.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/fpga/intel-m10-bmc-sec-update.c b/drivers/fpga/intel-m10-bmc-sec-update.c
> > > index 10f678b9ed36..ae364c6636eb 100644
> > > --- a/drivers/fpga/intel-m10-bmc-sec-update.c
> > > +++ b/drivers/fpga/intel-m10-bmc-sec-update.c
> > > @@ -10,6 +10,7 @@
> > > #include <linux/firmware.h>
> > > #include <linux/mfd/intel-m10-bmc.h>
> > > #include <linux/mod_devicetable.h>
> > > +#include <linux/mm.h>
> >
> > Why add this header file?
>
> When I was preparing the series, I had build issues without this. But
> now I checked it against -rc5, and it's clean. Would you like me to
> resend?

No need. Given that I'll pick this patch alone to fpga for-next with the
fix.

Reviewed-by: Xu Yilun <yilun.xu@xxxxxxxxx>

>
> > > #include <linux/module.h>
> > > #include <linux/platform_device.h>
> > > #include <linux/slab.h>
> > > @@ -183,7 +184,7 @@ show_canceled_csk(struct device *dev, u32 addr, char *buf)
> > >
> > > bitmap_from_arr32(csk_map, csk32, CSK_BIT_LEN);
> > > bitmap_complement(csk_map, csk_map, CSK_BIT_LEN);
> > > - return bitmap_print_to_pagebuf(1, buf, csk_map, CSK_BIT_LEN);
> > > + return sysfs_emit(buf, "%*pbl\n", CSK_BIT_LEN, csk_map);
> > > }
> > >
> > > #define DEVICE_ATTR_SEC_CSK_RO(_name) \
> > > --
> > > 2.43.0
> > >
> > >