El jueves, 3 de octubre de 2024, 23:20:08 GMT-7, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> escribió: On Thu, Oct 03, 2024 at 08:05:12PM -0700, Manuel Quintero F wrote:> Fix checkpatch error "do not use assignment in if condition"> > Signed-off-by: Manuel Quintero F <sakunix@xxxxxxxxx>> Signed-off-by: Manuel Quintero F <sakunix@xxxxxxxxx> Why twice? When I checked the patch it was not signed twice. > --- > drivers/usb/atm/speedtch.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c > index 973548b5c15c..dfd362abf602 100644 > --- a/drivers/usb/atm/speedtch.c > +++ b/drivers/usb/atm/speedtch.c > @@ -324,7 +324,9 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance, > because we're in our own kernel thread anyway. */ > msleep_interruptible(1000); > > - if ((ret = usb_set_interface(usb_dev, INTERFACE_DATA, instance->params.altsetting)) < 0) { > + ret = usb_set_interface(usb_dev, INTERFACE_DATA, instance->params.altsetting > + > + if (ret < 0) { Why the extra blank line? I already had that blank line before the if, and the checkpatch script did not give me that error When learning to do kernel changes, I recommend doing so in drivers/staging/ first, as that is what it is there for. Only after getting experience would I recommend doing this in other areas of the kernel, and even then, only do checkpatch cleanups for code that you can test, or that the subsystem maintainer has explicitly asked for. good luck! greg k-h Thanks for the info, should I correct the blank line and send you version 2 of the patch?