lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOoeyxWd29OWvmp2cHVmit5kJpngYWUJ2Xfdt7C9hOv4iZvArg@mail.gmail.com>
Date: Thu, 5 Jun 2025 15:49:55 +0800
From: Ming Yu <a0282524688@...il.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Oliver Neukum <oneukum@...e.com>, lee@...nel.org, linus.walleij@...aro.org, 
	brgl@...ev.pl, andi.shyti@...nel.org, mkl@...gutronix.de, 
	mailhol.vincent@...adoo.fr, andrew+netdev@...n.ch, davem@...emloft.net, 
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	wim@...ux-watchdog.org, jdelvare@...e.com, alexandre.belloni@...tlin.com, 
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org, 
	linux-i2c@...r.kernel.org, linux-can@...r.kernel.org, netdev@...r.kernel.org, 
	linux-watchdog@...r.kernel.org, linux-hwmon@...r.kernel.org, 
	linux-rtc@...r.kernel.org, linux-usb@...r.kernel.org, 
	Ming Yu <tmyu0@...oton.com>
Subject: Re: [PATCH v12 1/7] mfd: Add core driver for Nuvoton NCT6694

Dear Guenter,

Thank you for reviewing,

Guenter Roeck <linux@...ck-us.net> 於 2025年6月4日 週三 下午8:40寫道:
>
> >> +static void usb_int_callback(struct urb *urb)
> >> +{
> >> +    struct nct6694 *nct6694 = urb->context;
> >> +    unsigned int *int_status = urb->transfer_buffer;
> >> +    int ret;
> >> +
> >> +    switch (urb->status) {
> >> +    case 0:
> >> +        break;
> >> +    case -ECONNRESET:
> >> +    case -ENOENT:
> >> +    case -ESHUTDOWN:
> >> +        return;
> >> +    default:
> >> +        goto resubmit;
> >> +    }
> >> +
> >> +    while (*int_status) {
> >> +        int irq = __ffs(*int_status);
> >> +
> >> +        generic_handle_irq_safe(irq_find_mapping(nct6694->domain, irq));
> >> +        *int_status &= ~BIT(irq);
> >> +    }
> >
> > Does modifying the byte have any benefit?
> >
>
> Not sure if I understand the question, and assuming your question is regarding
> *int_status: *int_status!=0 is the loop invariant, so, yes, modifying it does
> have a benefit.
>
> I'd be more concerned that transfer_buffer is the raw buffer, and that data
> read from it is not endianness converted. That makes me wonder if and how the
> code would work on a big endian system.
>

I will update the code in the next patch to use __le32 for the
variable to ensure proper endianness handling across architectures.


Best regards,
Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ