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: <CAHp75VeUDnkjnssO4pjJ5TKw63=YgjqtAruunKA4FiLaHNX1Jg@mail.gmail.com>
Date:   Mon, 21 Nov 2022 15:28:16 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Martin Kurbanov <mmkurbanov@...rdevices.ru>
Cc:     Pavel Machek <pavel@....cz>,
        Raphael Teysseyre <rteysseyre@...il.com>,
        linux-kernel@...r.kernel.org, linux-leds@...r.kernel.org,
        kernel@...rdevices.ru
Subject: Re: [PATCH v2 1/2] leds: trigger: pattern: minor code style changes

On Mon, Nov 21, 2022 at 2:39 PM Martin Kurbanov
<mmkurbanov@...rdevices.ru> wrote:
>
> This patch adds some minor code style changes:
>     - remove a blank line before DEVICE_ATTR_RW declarations
>     - convert sysfs scnprintf() to sysfs_emit()/sysfs_emit_at()
>     - use module_led_trigger instead of pattern_trig_init/exit
>
> Signed-off-by: Martin Kurbanov <mmkurbanov@...rdevices.ru>

...

> +               count += sysfs_emit_at(buf, count,
> +                                      "%d %u ",

With this getting shorter you may put these to one line.

> +                                      data->patterns[i].brightness,
> +                                      data->patterns[i].delta_t);

...

> -static int __init pattern_trig_init(void)
> -{
> -       return led_trigger_register(&pattern_led_trigger);
> -}
> -
> -static void __exit pattern_trig_exit(void)
> -{
> -       led_trigger_unregister(&pattern_led_trigger);
> -}
> -
> -module_init(pattern_trig_init);
> -module_exit(pattern_trig_exit);
> +module_led_trigger(pattern_led_trigger);

This should be a separate patch.

...

Otherwise this looks good to me.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ