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:	Fri, 19 Jun 2015 12:16:47 +0530
From:	Shobhit Kumar <kumar@...bhit.info>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	Shobhit Kumar <shobhit.kumar@...el.com>,
	linux-pwm <linux-pwm@...r.kernel.org>,
	Jani Nikula <jani.nikula@...el.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Alexandre Courbot <gnurou@...il.com>,
	David Airlie <airlied@...ux.ie>,
	Povilas Staniulis <wdmonster@...il.com>,
	intel-gfx <intel-gfx@...ts.freedesktop.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	linux-gpio <linux-gpio@...r.kernel.org>,
	Chih-Wei Huang <cwhuang@...roid-x86.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Daniel Vetter <daniel.vetter@...el.com>,
	Lee Jones <lee.jones@...aro.org>,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [Intel-gfx] [PATCH 6/8] drivers/pwm: Add Crystalcove (CRC) PWM driver

Hi Paul,

On Fri, Jun 19, 2015 at 12:11 AM, Paul Bolle <pebolle@...cali.nl> wrote:
> Hi Shobhit,
>
> On Thu, 2015-06-18 at 23:24 +0530, Shobhit Kumar wrote:
>> On Fri, May 1, 2015 at 2:42 AM, Paul Bolle <pebolle@...cali.nl> wrote:
>> > On Wed, 2015-04-29 at 19:30 +0530, Shobhit Kumar wrote:
>> >> --- a/drivers/pwm/Kconfig
>> >> +++ b/drivers/pwm/Kconfig
>> >
>> >> +config PWM_CRC
>> >> +     bool "Intel Crystalcove (CRC) PWM support"
>> >> +     depends on X86 && INTEL_SOC_PMIC
>> >> +     help
>> >> +       Generic PWM framework driver for Crystalcove (CRC) PMIC based PWM
>> >> +       control.
>> >
>> >> --- a/drivers/pwm/Makefile
>> >> +++ b/drivers/pwm/Makefile
>> >
>> >> +obj-$(CONFIG_PWM_CRC)                += pwm-crc.o
>> >
>> > PWM_CRC is a bool symbol. So pwm-crc.o can never be part of a module.
>>
>> I actually started this as a module but later decided to make it as
>> bool because INTEL_SOC_PMIC on which this depends is itself a bool as
>> well.
>
> As does GPIO_CRYSTAL_COVE and that's a tristate. So?
>
>> Still it is good to keep the module based initialization.
>> Firstly because it causes no harm
>
> If I got a dime for every time people used an argument like that I ... I
> could treat myself to an ice cream. A really big ice cream. Hmm, that
> doesn't sound too impressive. But still, "causes no harm" is below the
> bar for kernel code. Kernel code needs to add value.
>
>> and even though some of the macros
>> are pre-processed out, gives info about the driver.
>
> None of which can't be gotten elsewhere (ie, the commit message, or the
> file these macro reside in).
>

Causes no harm comment had to be read together with more info about
the driver. It causes no harm while providing more info. And as you
only said those macros are pre-processed out to really the defaults
for built-in drivers. So what is the exact big problem with this ? I
can anyway shove out these macros to end the discussion.

BTW whether you  buy the argument or not, please do treat yourself
with ice cream for being able to make such a comment.

>> Secondly there
>> were discussion on why INTEL_SOC_PMIC is bool (note this driver also
>> has module based initialization even when bool).
>
> Yes, there's copy and paste going on even in kernel development.
>

There are other examples in the kernel. I just gave the one which is
related as well.

Regards
Shobhit

>> I am guessing because
>> of some tricky module load order dependencies. If ever that becomes a
>> module, this can mostly be unchanged to be loaded as a module.
>
> You put in a macro, or any other bit of code, when it's needed, not
> beforehand, "just in case". That's silly.
>
> Thanks,
>
>
> Paul Bolle
>
--
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