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]
Message-ID: <CAFRkauAZGnd5JDkvYtZDbNPTt1JT==zyg1a96hbkY24h2kofng@mail.gmail.com>
Date:	Wed, 20 Aug 2014 10:51:33 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Guodong Xu <guodong.xu@...aro.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: core: Fix build error due to const qualifier
 for ops

2014-08-18 22:10 GMT+08:00 Mark Brown <broonie@...nel.org>:
> On Mon, Aug 18, 2014 at 10:34:08AM +0800, Axel Lin wrote:
>> Drop const qualifier for ops of struct regulator_desc.
>> Allow regulator drivers to update ops before registering regulator.
>
> Applied, thanks.

Hi Mark,
I found this commit is applied and I got below build warning in your for-next
tree.

  CC [M]  drivers/regulator/hi6421-regulator.o
drivers/regulator/hi6421-regulator.c:356:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:358:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:360:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:362:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:364:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:366:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:368:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:370:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:372:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:374:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:376:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:378:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:380:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:382:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:384:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:386:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:388:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:390:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:392:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:394:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:396:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:398:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:400:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:401:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:402:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:403:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:405:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]
drivers/regulator/hi6421-regulator.c:407:2: warning: initialization
discards 'const' qualifier from pointer target type [enabled by
default]

As I mentioned in the commit log:
    Drop const qualifier for ops of struct regulator_desc.
    Allow regulator drivers to update ops before registering regulator.
    So I don't think it's necessary to add const for ops in struct
regulator_desc.
    (I think the original point was the "regulator core" won't modify the ops).

The fix is either drop the 'const' qualifier in hi6421-regulator driver or
add back const qualifier for ops of struct regulator_desc in
include/linux/regulator/driver.h.
Which one do you prefer?

Thanks,
Axel
--
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