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: <961cb55f-1725-4e3e-9704-c0e7cb9e4e7c@ti.com>
Date: Mon, 12 Feb 2024 10:13:14 -0600
From: Andrew Davis <afd@...com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
CC: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        Cristian
 Ciocaltea <cristian.ciocaltea@...il.com>,
        Florian Fainelli
	<florian.fainelli@...adcom.com>,
        Ray Jui <rjui@...adcom.com>, Scott Branden
	<sbranden@...adcom.com>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad
 Dybcio <konrad.dybcio@...aro.org>,
        Sean Wang <sean.wang@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>,
        <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-actions@...ts.infradead.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v3 18/19] power: reset: syscon-poweroff: Move device data
 into a struct

On 2/11/24 5:52 PM, Sebastian Reichel wrote:
> Hi Andrew,
> 
> On Thu, Feb 08, 2024 at 11:04:09AM -0600, Andrew Davis wrote:
>> Currently all these device data elements are top level global variables.
>> Move these into a struct. This will be used in the next patch when
>> the global variable usage is removed. Doing this in two steps makes
>> the patches easier to read.
>>
>> Signed-off-by: Andrew Davis <afd@...com>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
>> ---
>>   drivers/power/reset/syscon-poweroff.c | 36 +++++++++++++++------------
>>   1 file changed, 20 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/power/reset/syscon-poweroff.c b/drivers/power/reset/syscon-poweroff.c
>> index 1b2ce7734260c..4899a019256e8 100644
>> --- a/drivers/power/reset/syscon-poweroff.c
>> +++ b/drivers/power/reset/syscon-poweroff.c
>> @@ -15,15 +15,19 @@
>>   #include <linux/pm.h>
>>   #include <linux/regmap.h>
>>   
>> -static struct regmap *map;
>> -static u32 offset;
>> -static u32 value;
>> -static u32 mask;
>> +struct syscon_poweroff_data {
>> +	struct regmap *map;
>> +	u32 offset;
>> +	u32 value;
>> +	u32 mask;
>> +};
>> +
>> +static struct syscon_poweroff_data *data;
> 
> This patch is broken without the follow-up patch, since data is
> never allocated. You need to move the memory allocation from the
> next patch to this one.

Ah, yes, seems I meant to make this struct point to a definition
not just a declaration. But just moving the allocation to this
patch seems to make this easier too, will do that, v4 on the way.

Thanks,
Andrew

> 
> Greetings,
> 
> -- Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ