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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Mar 2013 23:16:01 +0000
From:	"Kim, Milo" <Milo.Kim@...com>
To:	Bryan Wu <cooloney@...il.com>
CC:	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Jeong, Daniel" <Daniel.Jeong@...com>
Subject: RE: [PATCH 2/3] leds: add LED Trigger for camera function

> > +#if defined(CONFIG_LEDS_TRIGGER_CAMERA) ||
> defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
> > +extern void ledtrig_flash_ctrl(bool on);
> > +extern void ledtrig_torch_ctrl(bool on);
> > +#else
> > +#define ledtrig_flash_ctrl(x) do {} while(0)
> > +#define ledtrig_torch_ctrl(x) do {} while(0)
> 
> It's better don't use #define macros but use real empty functions like
> this:
> static inline void ledtrig_flash_ctrl(bool on)
> {
>         return;
> }

I agree, but other trigger functions are declared as do-while definition.
So I would let them unify if it's not critical.
I'd like to have your opinion, which is better.

Thanks,
Milo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ