Re: [PATCH 1/4] usb: cdns3: gadget: Replace trace_printk by dev_dbg

2020-07-24 Thread Felipe Balbi
Nicolas Boichat  writes:

> On Thu, Jul 23, 2020 at 9:17 PM Felipe Balbi  wrote:
>>
>> Nicolas Boichat  writes:
>>
>> > trace_printk should not be used in production code, replace it
>> > call with dev_dbg.
>> >
>> > Signed-off-by: Nicolas Boichat 
>> >
>> > ---
>> >
>> > Unclear why a trace_printk was used in the first place, it's
>> > possible that some rate-limiting is necessary here.
>> >
>> >  drivers/usb/cdns3/gadget.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
>> > index 5e24c2e57c0d8c8..c303ab7c62d1651 100644
>> > --- a/drivers/usb/cdns3/gadget.c
>> > +++ b/drivers/usb/cdns3/gadget.c
>> > @@ -421,7 +421,7 @@ static int cdns3_start_all_request(struct cdns3_device 
>> > *priv_dev,
>> >   if ((priv_req->flags & REQUEST_INTERNAL) ||
>> >   (priv_ep->flags & EP_TDLCHK_EN) ||
>> >   priv_ep->use_streams) {
>> > - trace_printk("Blocking external request\n");
>> > + dev_dbg(priv_dev->dev, "Blocking external 
>> > request\n");
>>
>> Instead, I would suggest adding a proper trace event here; one that
>> includes "priv_ep->flags" in the output.
>
> The patch was already merged by Greg
> (https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/cdns3/gadget.c?id=b3a5ce874c2619c9b8a6c5bbcfefdb95e0227600),
> but feel free to do that as a follow-up CL.
>
> Looks like Peter -- the main author, is ok with dev_dbg (also,
> apologies for missing the R-b tag when I sent a v2 -- which is the one
> that was merged by Greg).

That's okay, we can get a proper trace event for v5.10. Maybe Pawel or
Roger would like to take the effort?

-- 
balbi


signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Rohit Bharadwaj
On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:
> changed usage of slave (deprecated) to secondary
> 
> Signed-off-by: Rohit K Bharadwaj 
> ---
> v3: change patch subject, add version history
> v2: add changelog text in body of mail
> v1: fix style issues by changing usage of slave to secondary
> 
>  drivers/staging/nvec/nvec.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> index 360ec0407740..5d7b66719a39 100644
> --- a/drivers/staging/nvec/nvec.c
> +++ b/drivers/staging/nvec/nvec.c
> @@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
>   return IRQ_HANDLED;
>  }
>  
> -static void tegra_init_i2c_slave(struct nvec_chip *nvec)
> +static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
>  {
>   u32 val;
>  
> @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
> +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
>  {
>   disable_irq(nvec->irq);
>   writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>   platform_set_drvdata(pdev, nvec);
>   nvec->dev = dev;
>  
> - if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
> + if (of_property_read_u32(dev->of_node, "secondary-addr", 
> &nvec->i2c_addr)) {
>   dev_err(dev, "no i2c address specified");
>   return -ENODEV;
>   }
> @@ -839,7 +839,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>   }
>   disable_irq(nvec->irq);
>  
> - tegra_init_i2c_slave(nvec);
> + tegra_init_i2c_secondary(nvec);
>  
>   /* enable event reporting */
>   nvec_toggle_global_events(nvec, true);
> @@ -913,7 +913,7 @@ static int nvec_suspend(struct device *dev)
>   if (!err)
>   nvec_msg_free(nvec, msg);
>  
> - nvec_disable_i2c_slave(nvec);
> + nvec_disable_i2c_secondary(nvec);
>  
>   return 0;
>  }
> @@ -923,7 +923,7 @@ static int nvec_resume(struct device *dev)
>   struct nvec_chip *nvec = dev_get_drvdata(dev);
>  
>   dev_dbg(nvec->dev, "resuming\n");
> - tegra_init_i2c_slave(nvec);
> + tegra_init_i2c_secondary(nvec);
>   nvec_toggle_global_events(nvec, true);
>  
>   return 0;
> 
Dear All, this message was not delivered to marvi...@gmx.de, I'm getting that 
The response from the remote server was:
554 gmx.net (mxgmx016) Nemesis ESMTP Service not available No SMTP service 
Reject due to policy restrictions, 

I'm really sorry if I'm wasting your time by these trivial problems, thanks a 
lot for your time, could you please let me know whether I have to resend the 
patch again or is the patch fine currently and can be accepted into the linux 
kernel tree?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Greg KH
On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:
> On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:
> > changed usage of slave (deprecated) to secondary
> > 
> > Signed-off-by: Rohit K Bharadwaj 
> > ---
> > v3: change patch subject, add version history
> > v2: add changelog text in body of mail
> > v1: fix style issues by changing usage of slave to secondary
> > 
> >  drivers/staging/nvec/nvec.c | 12 ++--
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> > index 360ec0407740..5d7b66719a39 100644
> > --- a/drivers/staging/nvec/nvec.c
> > +++ b/drivers/staging/nvec/nvec.c
> > @@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
> > return IRQ_HANDLED;
> >  }
> >  
> > -static void tegra_init_i2c_slave(struct nvec_chip *nvec)
> > +static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
> >  {
> > u32 val;
> >  
> > @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
> >  }
> >  
> >  #ifdef CONFIG_PM_SLEEP
> > -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
> > +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
> >  {
> > disable_irq(nvec->irq);
> > writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
> > @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device 
> > *pdev)
> > platform_set_drvdata(pdev, nvec);
> > nvec->dev = dev;
> >  
> > -   if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
> > +   if (of_property_read_u32(dev->of_node, "secondary-addr", 
> > &nvec->i2c_addr)) {
> > dev_err(dev, "no i2c address specified");
> > return -ENODEV;
> > }
> > @@ -839,7 +839,7 @@ static int tegra_nvec_probe(struct platform_device 
> > *pdev)
> > }
> > disable_irq(nvec->irq);
> >  
> > -   tegra_init_i2c_slave(nvec);
> > +   tegra_init_i2c_secondary(nvec);
> >  
> > /* enable event reporting */
> > nvec_toggle_global_events(nvec, true);
> > @@ -913,7 +913,7 @@ static int nvec_suspend(struct device *dev)
> > if (!err)
> > nvec_msg_free(nvec, msg);
> >  
> > -   nvec_disable_i2c_slave(nvec);
> > +   nvec_disable_i2c_secondary(nvec);
> >  
> > return 0;
> >  }
> > @@ -923,7 +923,7 @@ static int nvec_resume(struct device *dev)
> > struct nvec_chip *nvec = dev_get_drvdata(dev);
> >  
> > dev_dbg(nvec->dev, "resuming\n");
> > -   tegra_init_i2c_slave(nvec);
> > +   tegra_init_i2c_secondary(nvec);
> > nvec_toggle_global_events(nvec, true);
> >  
> > return 0;
> > 
> Dear All, this message was not delivered to marvi...@gmx.de, I'm getting that 
> The response from the remote server was:
> 554 gmx.net (mxgmx016) Nemesis ESMTP Service not available No SMTP service 
> Reject due to policy restrictions, 

Not a big deal, email address atrophy over time.  That's why you always
cc: a public mailing list for patches.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Rohit Bharadwaj
On 24/07/20 1:58 pm, Greg KH wrote:
> On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:
>> On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:
>>> changed usage of slave (deprecated) to secondary
>>>
>>> Signed-off-by: Rohit K Bharadwaj 
>>> ---
>>> v3: change patch subject, add version history
>>> v2: add changelog text in body of mail
>>> v1: fix style issues by changing usage of slave to secondary
>>>
>>>  drivers/staging/nvec/nvec.c | 12 ++--
>>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
>>> index 360ec0407740..5d7b66719a39 100644
>>> --- a/drivers/staging/nvec/nvec.c
>>> +++ b/drivers/staging/nvec/nvec.c
>>> @@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
>>> return IRQ_HANDLED;
>>>  }
>>>  
>>> -static void tegra_init_i2c_slave(struct nvec_chip *nvec)
>>> +static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
>>>  {
>>> u32 val;
>>>  
>>> @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
>>>  }
>>>  
>>>  #ifdef CONFIG_PM_SLEEP
>>> -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
>>> +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
>>>  {
>>> disable_irq(nvec->irq);
>>> writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
>>> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device 
>>> *pdev)
>>> platform_set_drvdata(pdev, nvec);
>>> nvec->dev = dev;
>>>  
>>> -   if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
>>> +   if (of_property_read_u32(dev->of_node, "secondary-addr", 
>>> &nvec->i2c_addr)) {
>>> dev_err(dev, "no i2c address specified");
>>> return -ENODEV;
>>> }
>>> @@ -839,7 +839,7 @@ static int tegra_nvec_probe(struct platform_device 
>>> *pdev)
>>> }
>>> disable_irq(nvec->irq);
>>>  
>>> -   tegra_init_i2c_slave(nvec);
>>> +   tegra_init_i2c_secondary(nvec);
>>>  
>>> /* enable event reporting */
>>> nvec_toggle_global_events(nvec, true);
>>> @@ -913,7 +913,7 @@ static int nvec_suspend(struct device *dev)
>>> if (!err)
>>> nvec_msg_free(nvec, msg);
>>>  
>>> -   nvec_disable_i2c_slave(nvec);
>>> +   nvec_disable_i2c_secondary(nvec);
>>>  
>>> return 0;
>>>  }
>>> @@ -923,7 +923,7 @@ static int nvec_resume(struct device *dev)
>>> struct nvec_chip *nvec = dev_get_drvdata(dev);
>>>  
>>> dev_dbg(nvec->dev, "resuming\n");
>>> -   tegra_init_i2c_slave(nvec);
>>> +   tegra_init_i2c_secondary(nvec);
>>> nvec_toggle_global_events(nvec, true);
>>>  
>>> return 0;
>>>
>> Dear All, this message was not delivered to marvi...@gmx.de, I'm getting 
>> that The response from the remote server was:
>> 554 gmx.net (mxgmx016) Nemesis ESMTP Service not available No SMTP service 
>> Reject due to policy restrictions, 
> 
> Not a big deal, email address atrophy over time.  That's why you always
> cc: a public mailing list for patches.
> 
> thanks,
> 
> greg k-h
> 
Thank you so much for the reply sir, I hope this patch gets accepted.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: octeon: Indent with tabs instead of spaces

2020-07-24 Thread Dan Carpenter
On Wed, Jul 22, 2020 at 10:19:50PM +0500, Muhammad Usama Anjum wrote:
> Remove a coding style error. It makes code more readable.
> 
> Signed-off-by: Muhammad Usama Anjum 
> ---

This isn't a part of the official style guide so the original is fine.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] media: atomisp: Replace trace_printk by pr_info

2020-07-24 Thread Nicolas Boichat
On Fri, Jul 10, 2020 at 3:03 PM Greg Kroah-Hartman
 wrote:
>
> On Fri, Jul 10, 2020 at 02:45:29PM +0800, Nicolas Boichat wrote:
> > trace_printk should not be used in production code, replace it
> > call with pr_info.
> >
> > Signed-off-by: Nicolas Boichat 
> > ---
> > Sent this before as part of a series (whose 4th patch was a
> > change that allows to detect such trace_printk), but maybe it's
> > easier to get individual maintainer attention by splitting it.
>
> Mauro should take this soon:
>
> Acked-by: Greg Kroah-Hartman 

Mauro: did you get a chance to look at this? (and the other similar
patch "media: camss: vfe: Use trace_printk for debugging only")

Thanks!
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode

2020-07-24 Thread Dinghao Liu
The variable authmode will keep uninitialized if neither if
statements used to initialize this variable are not triggered.
Then authmode may contain a garbage value and influence the
execution flow of this function.

Fix this by initializing it to zero.

Signed-off-by: Dinghao Liu 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 9de2d421f6b1..716f8d8a5c13 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -1711,7 +1711,7 @@ static int rtw_append_pmkid(struct adapter *Adapter, int 
iEntry, u8 *ie, uint ie
 
 int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint 
in_len)
 {
-   u8 authmode;
+   u8 authmode = 0;
uint ielength;
int iEntry;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
-- 
2.17.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/6] drivers: android: Fix a variable declaration coding style issue

2020-07-24 Thread Mrinal Pandey
Add a blank line after variable declarations as suggested by checkpatch.

Signed-off-by: Mrinal Pandey 
---
 drivers/android/binder_alloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 42c672f1584e..0294cef7402c 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -547,6 +547,7 @@ static void binder_delete_free_buffer(struct binder_alloc 
*alloc,
 {
struct binder_buffer *prev, *next = NULL;
bool to_free = true;
+
BUG_ON(alloc->buffers.next == &buffer->entry);
prev = binder_buffer_prev(buffer);
BUG_ON(!prev->free);
-- 
2.25.1



signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/6] drivers: android: Remove the use of else after return

2020-07-24 Thread Mrinal Pandey
Remove the unnecessary else branch after return statement as suggested by
checkpatch.

Signed-off-by: Mrinal Pandey 
---
 drivers/android/binder.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f50c5f182bb5..5fdf982ec83b 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1969,9 +1969,8 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
binder_thread_dec_tmpref(target_thread);
binder_free_transaction(t);
return;
-   } else {
-   __release(&target_thread->proc->inner_lock);
}
+   __release(&target_thread->proc->inner_lock);
next = t->from_parent;
 
binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-- 
2.25.1



signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/6] drivers: android: Remove braces for a single statement if-else block

2020-07-24 Thread Mrinal Pandey
Remove braces for both if and else block as suggested by checkpatch.

Signed-off-by: Mrinal Pandey 
---
 drivers/android/binder.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 5fdf982ec83b..3cf13ff16934 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2759,11 +2759,10 @@ static bool binder_proc_transaction(struct 
binder_transaction *t,
binder_node_lock(node);
if (oneway) {
BUG_ON(thread);
-   if (node->has_async_transaction) {
+   if (node->has_async_transaction)
pending_async = true;
-   } else {
+   else
node->has_async_transaction = true;
-   }
}
 
binder_inner_proc_lock(proc);
-- 
2.25.1



signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 6/6] drivers: android: Fix the SPDX comment style

2020-07-24 Thread Mrinal Pandey
C source files should have `//` as SPDX comment and not `/**/`. Fix this
by running checkpatch on the file.

Signed-off-by: Mrinal Pandey 
---
 drivers/android/binderfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 8a98a36ff71a..4eada4dc232f 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+// SPDX-License-Identifier: GPL-2.0
 
 #include 
 #include 
-- 
2.25.1



signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/6] drivers: android: Fix a variable declaration coding style issue

2020-07-24 Thread Mrinal Pandey
Add a blank line after variable declarations as suggested by checkpatch.

Signed-off-by: Mrinal Pandey 
---
 drivers/android/binder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 3cf13ff16934..75832f236bf9 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3631,6 +3631,7 @@ static int binder_thread_write(struct binder_proc *proc,
ret = -1;
if (increment && !target) {
struct binder_node *ctx_mgr_node;
+
mutex_lock(&context->context_mgr_node_lock);
ctx_mgr_node = context->binder_context_mgr_node;
if (ctx_mgr_node)
-- 
2.25.1



signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/6] drivers: android: Fix a variable declaration coding style issue

2020-07-24 Thread Mrinal Pandey
Add a blank line after variable declarations as suggested by checkpatch.

Signed-off-by: Mrinal Pandey 
---
 drivers/android/binderfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 7cf566aafe1f..8a98a36ff71a 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -351,6 +351,7 @@ static const struct super_operations binderfs_super_ops = {
 static inline bool is_binderfs_control_device(const struct dentry *dentry)
 {
struct binderfs_info *info = dentry->d_sb->s_fs_info;
+
return info->control_dentry == dentry;
 }
 
-- 
2.25.1



signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode

2020-07-24 Thread Greg Kroah-Hartman
On Fri, Jul 24, 2020 at 08:29:55PM +0800, Dinghao Liu wrote:
> The variable authmode will keep uninitialized if neither if
> statements used to initialize this variable are not triggered.
> Then authmode may contain a garbage value and influence the
> execution flow of this function.
> 
> Fix this by initializing it to zero.

That does not fix anything, you just now are potentially setting a value
you really do not have.

Are you sure that this variable really will never be set?  If so, please
fix it up with a "real" value that the code can handle properly.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] change slave occurence to secondary everywhere

2020-07-24 Thread Dan Carpenter
On Thu, Jul 23, 2020 at 08:28:11PM +0530, Rohit K Bharadwaj wrote:
> @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
> +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
>  {
>   disable_irq(nvec->irq);
>   writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>   platform_set_drvdata(pdev, nvec);
>   nvec->dev = dev;
>  
> - if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
> + if (of_property_read_u32(dev->of_node, "secondary-addr", 
> &nvec->i2c_addr)) {

This change will break the driver.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] change slave occurence to secondary everywhere

2020-07-24 Thread Dan Carpenter
The patch prefix isn't right.

On Thu, Jul 23, 2020 at 08:45:13PM +0530, Rohit K Bharadwaj wrote:
> changed usage of slave (deprecated) to secondary
> 
> Signed-off-by: Rohit K Bharadwaj 
> ---
>  drivers/staging/nvec/nvec.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> index 360ec0407740..5d7b66719a39 100644
> --- a/drivers/staging/nvec/nvec.c
> +++ b/drivers/staging/nvec/nvec.c
> @@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
>   return IRQ_HANDLED;
>  }
>  
> -static void tegra_init_i2c_slave(struct nvec_chip *nvec)
> +static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
>  {
>   u32 val;
>  
> @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
> +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
>  {
>   disable_irq(nvec->irq);
>   writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>   platform_set_drvdata(pdev, nvec);
>   nvec->dev = dev;
>  
> - if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
> + if (of_property_read_u32(dev->of_node, "secondary-addr", 
> &nvec->i2c_addr)) {

Be careful not to break the driver.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Dan Carpenter
On Fri, Jul 24, 2020 at 10:06:34AM +0530, Rohit K Bharadwaj wrote:
> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>   platform_set_drvdata(pdev, nvec);
>   nvec->dev = dev;
>  
> - if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
> + if (of_property_read_u32(dev->of_node, "secondary-addr", 
> &nvec->i2c_addr)) {

Sorry, I should have looked for v3 at the start to reply to it.  This
line will break the driver.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[staging:staging-testing] BUILD SUCCESS b5dbbadb0eb93aaca51d5effeed96b94af150e07

2020-07-24 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
 staging-testing
branch HEAD: b5dbbadb0eb93aaca51d5effeed96b94af150e07  Staging: rtl8188eu: Fix 
a constant comparison coding style issue

elapsed time: 952m

configs tested: 74
configs skipped: 1

The following configs have been built successfully.
More configs may be tested in the coming days.

arm defconfig
arm  allyesconfig
arm  allmodconfig
arm   allnoconfig
arm64allyesconfig
arm64   defconfig
arm64allmodconfig
arm64 allnoconfig
i386 allyesconfig
i386defconfig
i386  debian-10.3
i386  allnoconfig
ia64 allmodconfig
ia64defconfig
ia64  allnoconfig
ia64 allyesconfig
m68k allmodconfig
m68k  allnoconfig
m68k   sun3_defconfig
m68kdefconfig
m68k allyesconfig
nds32   defconfig
nds32 allnoconfig
csky allyesconfig
cskydefconfig
alpha   defconfig
alphaallyesconfig
xtensa   allyesconfig
h8300allyesconfig
h8300allmodconfig
xtensa  defconfig
arc defconfig
arc  allyesconfig
sh   allmodconfig
shallnoconfig
microblazeallnoconfig
nios2   defconfig
nios2allyesconfig
openriscdefconfig
c6x  allyesconfig
c6x   allnoconfig
openrisc allyesconfig
mips allyesconfig
mips  allnoconfig
mips allmodconfig
pariscallnoconfig
parisc  defconfig
parisc   allyesconfig
parisc   allmodconfig
powerpc defconfig
powerpc  allyesconfig
powerpc  rhel-kconfig
powerpc  allmodconfig
powerpc   allnoconfig
riscvallyesconfig
riscv allnoconfig
riscv   defconfig
riscvallmodconfig
s390 allyesconfig
s390  allnoconfig
s390 allmodconfig
s390defconfig
sparcallyesconfig
sparc   defconfig
sparc64   allnoconfig
sparc64  allmodconfig
sparc64 defconfig
sparc64  allyesconfig
x86_64   rhel
x86_64lkp
x86_64  fedora-25
x86_64rhel-7.6-kselftests
x86_64   rhel-8.3
x86_64  kexec

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Rohit K Bharadwaj
On 24/07/20 7:39 pm, Dan Carpenter wrote:
> On Fri, Jul 24, 2020 at 10:06:34AM +0530, Rohit K Bharadwaj wrote:
>> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
>>  platform_set_drvdata(pdev, nvec);
>>  nvec->dev = dev;
>>  
>> -if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
>> +if (of_property_read_u32(dev->of_node, "secondary-addr", 
>> &nvec->i2c_addr)) {
> 
> Sorry, I should have looked for v3 at the start to reply to it.  This
> line will break the driver.
> 
> regards,
> dan carpenter
> 

Thank you for your review sir, my intention was to fix kernel coding style 
issues and hence had picked this one. 
Could you please let me know whether I should undo that particular line and 
submit the patch again so as not to break the driver? 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Greg KH
On Fri, Jul 24, 2020 at 09:21:47PM +0530, Rohit K Bharadwaj wrote:
> On 24/07/20 7:39 pm, Dan Carpenter wrote:
> > On Fri, Jul 24, 2020 at 10:06:34AM +0530, Rohit K Bharadwaj wrote:
> >> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device 
> >> *pdev)
> >>platform_set_drvdata(pdev, nvec);
> >>nvec->dev = dev;
> >>  
> >> -  if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
> >> +  if (of_property_read_u32(dev->of_node, "secondary-addr", 
> >> &nvec->i2c_addr)) {
> > 
> > Sorry, I should have looked for v3 at the start to reply to it.  This
> > line will break the driver.
> > 
> > regards,
> > dan carpenter
> > 
> 
> Thank you for your review sir, my intention was to fix kernel coding style 
> issues and hence had picked this one. 
> Could you please let me know whether I should undo that particular line and 
> submit the patch again so as not to break the driver? 

Try making patches that do not break things :)

Maybe a different type of patch?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Marc Dietrich

Hi Rohit,

On Fri, 24 Jul 2020, Rohit Bharadwaj wrote:


On 24/07/20 1:58 pm, Greg KH wrote:

On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:

On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:

changed usage of slave (deprecated) to secondary

Signed-off-by: Rohit K Bharadwaj 
---
v3: change patch subject, add version history
v2: add changelog text in body of mail
v1: fix style issues by changing usage of slave to secondary

 drivers/staging/nvec/nvec.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 360ec0407740..5d7b66719a39 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
return IRQ_HANDLED;
 }

-static void tegra_init_i2c_slave(struct nvec_chip *nvec)
+static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
 {
u32 val;

@@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
 }

 #ifdef CONFIG_PM_SLEEP
-static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
+static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
 {
disable_irq(nvec->irq);
writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
@@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, nvec);
nvec->dev = dev;

-   if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
+   if (of_property_read_u32(dev->of_node, "secondary-addr", 
&nvec->i2c_addr)) {
dev_err(dev, "no i2c address specified");
return -ENODEV;
}


as Christoph said, please don't change this line.


@@ -839,7 +839,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
}
disable_irq(nvec->irq);

-   tegra_init_i2c_slave(nvec);
+   tegra_init_i2c_secondary(nvec);

/* enable event reporting */
nvec_toggle_global_events(nvec, true);
@@ -913,7 +913,7 @@ static int nvec_suspend(struct device *dev)
if (!err)
nvec_msg_free(nvec, msg);

-   nvec_disable_i2c_slave(nvec);
+   nvec_disable_i2c_secondary(nvec);

return 0;
 }
@@ -923,7 +923,7 @@ static int nvec_resume(struct device *dev)
struct nvec_chip *nvec = dev_get_drvdata(dev);

dev_dbg(nvec->dev, "resuming\n");
-   tegra_init_i2c_slave(nvec);
+   tegra_init_i2c_secondary(nvec);
nvec_toggle_global_events(nvec, true);

return 0;


Dear All, this message was not delivered to marvi...@gmx.de, I'm getting that 
The response from the remote server was:
554 gmx.net (mxgmx016) Nemesis ESMTP Service not available No SMTP service 
Reject due to policy restrictions,


Not a big deal, email address atrophy over time.  That's why you always
cc: a public mailing list for patches.


yes, my mail provider introduces a bit too aggressive mail filtering 
recently, causing me being unsubscribed frequently. I just changed my subscriber 
address, which should fix the problem, sorry.


Marc

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Marc Dietrich




On Fri, 24 Jul 2020, Marc Dietrich wrote:


Hi Rohit,

On Fri, 24 Jul 2020, Rohit Bharadwaj wrote:


On 24/07/20 1:58 pm, Greg KH wrote:

On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:

On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:

changed usage of slave (deprecated) to secondary

Signed-off-by: Rohit K Bharadwaj 
---
v3: change patch subject, add version history
v2: add changelog text in body of mail
v1: fix style issues by changing usage of slave to secondary

 drivers/staging/nvec/nvec.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 360ec0407740..5d7b66719a39 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void 
*dev)

return IRQ_HANDLED;
 }

-static void tegra_init_i2c_slave(struct nvec_chip *nvec)
+static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
 {
u32 val;

@@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip 
*nvec)

 }

 #ifdef CONFIG_PM_SLEEP
-static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
+static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
 {
disable_irq(nvec->irq);
writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
@@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device 
*pdev)

platform_set_drvdata(pdev, nvec);
nvec->dev = dev;

-	if (of_property_read_u32(dev->of_node, "slave-addr", 
&nvec->i2c_addr)) {
+	if (of_property_read_u32(dev->of_node, "secondary-addr", 
&nvec->i2c_addr)) {

dev_err(dev, "no i2c address specified");
return -ENODEV;
}


as Christoph said, please don't change this line.


arr, I meant Dan of course ;-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Rohit K Bharadwaj
On 24/07/20 10:06 pm, Marc Dietrich wrote:
> 
> 
> On Fri, 24 Jul 2020, Marc Dietrich wrote:
> 
>> Hi Rohit,
>>
>> On Fri, 24 Jul 2020, Rohit Bharadwaj wrote:
>>
>>> On 24/07/20 1:58 pm, Greg KH wrote:
 On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:
> On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:
>> changed usage of slave (deprecated) to secondary
>>
>> Signed-off-by: Rohit K Bharadwaj 
>> ---
>> v3: change patch subject, add version history
>> v2: add changelog text in body of mail
>> v1: fix style issues by changing usage of slave to secondary
>>
>>  drivers/staging/nvec/nvec.c | 12 ++--
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
>> index 360ec0407740..5d7b66719a39 100644
>> --- a/drivers/staging/nvec/nvec.c
>> +++ b/drivers/staging/nvec/nvec.c
>> @@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
>>  return IRQ_HANDLED;
>>  }
>>
>> -static void tegra_init_i2c_slave(struct nvec_chip *nvec)
>> +static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
>>  {
>>  u32 val;
>>
>> @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip 
>> *nvec)
>>  }
>>
>>  #ifdef CONFIG_PM_SLEEP
>> -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
>> +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
>>  {
>>  disable_irq(nvec->irq);
>>  writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
>> @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device 
>> *pdev)
>>  platform_set_drvdata(pdev, nvec);
>>  nvec->dev = dev;
>>
>> -    if (of_property_read_u32(dev->of_node, "slave-addr", 
>> &nvec->i2c_addr)) {
>> +    if (of_property_read_u32(dev->of_node, "secondary-addr", 
>> &nvec->i2c_addr)) {
>>  dev_err(dev, "no i2c address specified");
>>  return -ENODEV;
>>  }
>>
>> as Christoph said, please don't change this line.
> 
> arr, I meant Dan of course ;-)
Dear all, thank you so much for your inputs, I will try to make some other 
patch which will not break the driver (hopefully :p), or if you give me 
permission to submit this patch itself by just keeping this one line
  
> if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr))

unchanged, and provided it does not break the driver by doing so, I would 
gladly make the changes and submit v4 of the patch.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[driver-core:driver-core-testing] BUILD SUCCESS a24c6f7bc923d5e2f3139855eb09b0d480d6b410

2020-07-24 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git  
driver-core-testing
branch HEAD: a24c6f7bc923d5e2f3139855eb09b0d480d6b410  debugfs: Add access 
restriction option

elapsed time: 1338m

configs tested: 74
configs skipped: 1

The following configs have been built successfully.
More configs may be tested in the coming days.

arm64allyesconfig
arm64   defconfig
arm64allmodconfig
arm64 allnoconfig
arm defconfig
arm  allyesconfig
arm  allmodconfig
arm   allnoconfig
i386 allyesconfig
i386defconfig
i386  debian-10.3
i386  allnoconfig
ia64 allmodconfig
ia64defconfig
ia64  allnoconfig
ia64 allyesconfig
m68k allmodconfig
m68k  allnoconfig
m68k   sun3_defconfig
m68kdefconfig
m68k allyesconfig
nios2   defconfig
nios2allyesconfig
openriscdefconfig
c6x  allyesconfig
c6x   allnoconfig
openrisc allyesconfig
nds32   defconfig
nds32 allnoconfig
csky allyesconfig
cskydefconfig
alpha   defconfig
alphaallyesconfig
xtensa   allyesconfig
h8300allyesconfig
h8300allmodconfig
xtensa  defconfig
arc defconfig
arc  allyesconfig
sh   allmodconfig
shallnoconfig
microblazeallnoconfig
mips allyesconfig
mips  allnoconfig
mips allmodconfig
pariscallnoconfig
parisc  defconfig
parisc   allyesconfig
parisc   allmodconfig
powerpc defconfig
powerpc  allyesconfig
powerpc  rhel-kconfig
powerpc  allmodconfig
powerpc   allnoconfig
riscvallyesconfig
riscv allnoconfig
riscv   defconfig
riscvallmodconfig
s390 allyesconfig
s390  allnoconfig
s390 allmodconfig
s390defconfig
sparcallyesconfig
sparc   defconfig
sparc64 defconfig
sparc64   allnoconfig
sparc64  allyesconfig
sparc64  allmodconfig
x86_64   rhel
x86_64lkp
x86_64  fedora-25
x86_64rhel-7.6-kselftests
x86_64   rhel-8.3
x86_64  kexec

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode

2020-07-24 Thread Larry Finger

On 7/24/20 8:28 AM, Dinghao Liu wrote:

The variable authmode will keep uninitialized if neither if
statements used to initialize this variable are not triggered.


Besides Greg's comment, you need to re-parse this sentence. I realize that 
English is probably not your first language, but this one is not what you meant.


You likely meant "The variable authmode will remain uninitialized if all 
statements used to initialize this variable are not triggered."


A possible (line-wrapped) patch to quiet the tools would be:

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c

index 9de2d421f6b1..9e4d78bc9a2e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -1729,9 +1729,11 @@ int rtw_restruct_sec_ie(struct adapter *adapter, u8 
*in_ie, u8 *out_ie, uint in_

if ((ndisauthmode == Ndis802_11AuthModeWPA) ||
(ndisauthmode == Ndis802_11AuthModeWPAPSK))
authmode = _WPA_IE_ID_;
-   if ((ndisauthmode == Ndis802_11AuthModeWPA2) ||
-   (ndisauthmode == Ndis802_11AuthModeWPA2PSK))
+   else if ((ndisauthmode == Ndis802_11AuthModeWPA2) ||
+(ndisauthmode == Ndis802_11AuthModeWPA2PSK))
authmode = _WPA2_IE_ID_;
+   else
+   authmode = 0;

if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
memcpy(out_ie + ielength, psecuritypriv->wps_ie, 
psecuritypriv->wps_ie_len);



Yes, in this routine, it would be possible for authmode to not be set; however, 
later code only compares it to either _WPA_IE_ID_ or _WPA2_IE_ID_. It is never 
used in a way that an unset value could make the program flow be different by 
arbitrarily setting the value to zero. Thus your statement "Then authmode may 
contain a garbage value and influence the execution flow of this function." is 
false.


Larry
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Fix coding style issues

2020-07-24 Thread Anant Thazhemadam
Coding style issues found were rectified

Signed-off-by: Anant Thazhemadam 
---
 drivers/staging/rtl8188eu/core/rtw_security.c | 92 ++-
 1 file changed, 47 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c 
b/drivers/staging/rtl8188eu/core/rtw_security.c
index 21f6652dd69f..3111f4a899ee 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -127,8 +127,8 @@ static __le32 getcrc32(u8 *buf, int len)
 }
 
 /*
-   Need to consider the fragment  situation
-*/
+ * Need to consider the fragment  situation
+ */
 void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
 {
int curfragnum, length;
@@ -429,9 +429,9 @@ static const unsigned short Sbox1[2][256] = {  /* Sbox for 
hash (can be in ROM)
0x2DB6, 0x3C22, 0x1592, 0xC920, 0x8749, 0xAAFF, 0x5078, 0xA57A,
0x038F, 0x59F8, 0x0980, 0x1A17, 0x65DA, 0xD731, 0x84C6, 0xD0B8,
0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A,
-  },
+},
 
-  {  /* second half of table is unsigned char-reversed version of first! */
+{  /* second half of table is unsigned char-reversed version of first! */
0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491,
0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC,
0x458F, 0x9D1F, 0x4089, 0x87FA, 0x15EF, 0xEBB2, 0xC98E, 0x0BFB,
@@ -464,26 +464,26 @@ static const unsigned short Sbox1[2][256] = {  /* Sbox 
for hash (can be in ROM)
0xB62D, 0x223C, 0x9215, 0x20C9, 0x4987, 0xFFAA, 0x7850, 0x7AA5,
0x8F03, 0xF859, 0x8009, 0x171A, 0xDA65, 0x31D7, 0xC684, 0xB8D0,
0xC382, 0xB029, 0x775A, 0x111E, 0xCB7B, 0xFCA8, 0xD66D, 0x3A2C,
-  }
+}
 };
 
- /*
-**
-* Routine: Phase 1 -- generate P1K, given TA, TK, IV32
-*
-* Inputs:
-* tk[]  = temporal key  [128 bits]
-* ta[]  = transmitter's MAC address[ 48 bits]
-* iv32  = upper 32 bits of IV[ 32 bits]
-* Output:
-* p1k[] = Phase 1 key[ 80 bits]
-*
-* Note:
-* This function only needs to be called every 2**16 packets,
-* although in theory it could be called every packet.
-*
-**
-*/
+/*
+ **
+ * Routine: Phase 1 -- generate P1K, given TA, TK, IV32
+ *
+ * Inputs:
+ * tk[]  = temporal key [128 bits]
+ * ta[]  = transmitter's MAC address   [ 48 bits]
+ * iv32  = upper 32 bits of IV   [ 32 bits]
+ * Output:
+ * p1k[] = Phase 1 key   [ 80 bits]
+ *
+ * Note:
+ * This function only needs to be called every 2**16 packets,
+ * although in theory it could be called every packet.
+ *
+ **
+ */
 static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
 {
int  i;
@@ -507,28 +507,28 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, 
u32 iv32)
 }
 
 /*
-**
-* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
-*
-* Inputs:
-* tk[]  = Temporal key  [128 bits]
-* p1k[] = Phase 1 output key  [ 80 bits]
-* iv16  = low 16 bits of IV counter[ 16 bits]
-* Output:
-* rc4key[]  = the key used to encrypt the packet   [128 bits]
-*
-* Note:
-* The value {TA, IV32, IV16} for Phase1/Phase2 must be unique
-* across all packets using the same key TK value. Then, for a
-* given value of TK[], this TKIP48 construction guarantees that
-* the final RC4KEY value is unique across all packets.
-*
-* Suggested implementation optimization: if PPK[] is "overlaid"
-* appropriately on RC4KEY[], there is no need for the final
-* for loop below that copies the PPK[] result into RC4KEY[].
-*
-**
-*/
+ **
+ * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
+ *
+ * Inputs:
+ * tk[]  = Temporal key [128 bits]
+ * p1k[] = Phase 1 output key [ 80 bits]
+ * iv16  = low 16 bits of IV counter   [ 16 bits]
+ * Output:
+ * rc4key[]  = the key used to encrypt the packet   [128 bits]
+ *
+ * Note:
+ * The value {TA, IV32, IV16} for Phase1/Phase2 must be unique
+ * across all packets using the same key TK value. Then, for a
+ * given value of TK[], this TKIP48 construction guarantees that
+ * the final RC4KEY value is unique across all packets.
+ *
+ * Suggested implementation optimization: if PPK[] is "overlaid"
+ * appropriately on RC4KEY[], there is no need fo

Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Marc Dietrich


Hi Rohit,

On Fri, 24 Jul 2020, Rohit K Bharadwaj wrote:


On 24/07/20 10:06 pm, Marc Dietrich wrote:



On Fri, 24 Jul 2020, Marc Dietrich wrote:


Hi Rohit,

On Fri, 24 Jul 2020, Rohit Bharadwaj wrote:


On 24/07/20 1:58 pm, Greg KH wrote:

On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:

On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:

changed usage of slave (deprecated) to secondary

Signed-off-by: Rohit K Bharadwaj 
---
v3: change patch subject, add version history
v2: add changelog text in body of mail
v1: fix style issues by changing usage of slave to secondary

 drivers/staging/nvec/nvec.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 360ec0407740..5d7b66719a39 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
 return IRQ_HANDLED;
 }

-static void tegra_init_i2c_slave(struct nvec_chip *nvec)
+static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
 {
 u32 val;

@@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
 }

 #ifdef CONFIG_PM_SLEEP
-static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
+static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
 {
 disable_irq(nvec->irq);
 writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
@@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
 platform_set_drvdata(pdev, nvec);
 nvec->dev = dev;

-    if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) {
+    if (of_property_read_u32(dev->of_node, "secondary-addr", &nvec->i2c_addr)) 
{
 dev_err(dev, "no i2c address specified");
 return -ENODEV;
 }


as Christoph said, please don't change this line.


arr, I meant Dan of course ;-)

Dear all, thank you so much for your inputs, I will try to make some other 
patch which will not break the driver (hopefully :p), or if you give me 
permission to submit this patch itself by just keeping this one line


if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr))


unchanged, and provided it does not break the driver by doing so, I would 
gladly make the changes and submit v4 of the patch.


please resend the patch with the line above unchanged as v4. Don't forget 
to to update the changelog to the commit message. I tested your patch 
(without the dt property change) and it does not change behavoir - as expected,

so you will recevice my Ack.

Marc
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-24 Thread Jim Quinlan
The new field 'dma_range_map' in struct device is used to facilitate the
use of single or multiple offsets between mapping regions of cpu addrs and
dma addrs.  It subsumes the role of "dev->dma_pfn_offset" which was only
capable of holding a single uniform offset and had no region bounds
checking.

The function of_dma_get_range() has been modified so that it takes a single
argument -- the device node -- and returns a map, NULL, or an error code.
The map is an array that holds the information regarding the DMA regions.
Each range entry contains the address offset, the cpu_start address, the
dma_start address, and the size of the region.

of_dma_configure() is the typical manner to set range offsets but there are
a number of ad hoc assignments to "dev->dma_pfn_offset" in the kernel
driver code.  These cases now invoke the function
dma_attach_offset_range(dev, cpu_addr, dma_addr, size).

Signed-off-by: Jim Quinlan 
---
 arch/arm/include/asm/dma-mapping.h| 10 +--
 arch/arm/mach-keystone/keystone.c | 17 +++--
 arch/sh/drivers/pci/pcie-sh7786.c |  9 +--
 arch/sh/kernel/dma-coherent.c | 15 ++--
 arch/x86/pci/sta2x11-fixup.c  |  7 +-
 drivers/acpi/arm64/iort.c |  5 +-
 drivers/gpu/drm/sun4i/sun4i_backend.c |  5 +-
 drivers/iommu/io-pgtable-arm.c|  2 +-
 .../platform/sunxi/sun4i-csi/sun4i_csi.c  |  5 +-
 .../platform/sunxi/sun6i-csi/sun6i_csi.c  |  4 +-
 drivers/of/address.c  | 71 ---
 drivers/of/device.c   | 43 ++-
 drivers/of/of_private.h   | 10 +--
 drivers/of/unittest.c | 32 ++---
 drivers/pci/controller/pcie-brcmstb.c |  1 +
 drivers/remoteproc/remoteproc_core.c  |  2 +-
 .../staging/media/sunxi/cedrus/cedrus_hw.c|  7 +-
 drivers/usb/core/message.c|  4 +-
 drivers/usb/core/usb.c|  2 +-
 include/linux/device.h|  4 +-
 include/linux/dma-direct.h|  8 +--
 include/linux/dma-mapping.h   | 34 +
 kernel/dma/coherent.c | 10 +--
 kernel/dma/mapping.c  | 63 
 24 files changed, 248 insertions(+), 122 deletions(-)

diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index bdd80ddbca34..2405afeb7957 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -35,8 +35,11 @@ static inline const struct dma_map_ops 
*get_arch_dma_ops(struct bus_type *bus)
 #ifndef __arch_pfn_to_dma
 static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn)
 {
-   if (dev)
-   pfn -= dev->dma_pfn_offset;
+   if (dev) {
+   phys_addr_t paddr = PFN_PHYS(pfn);
+
+   pfn -= (dma_offset_from_phys_addr(dev, paddr) >> PAGE_SHIFT);
+   }
return (dma_addr_t)__pfn_to_bus(pfn);
 }
 
@@ -45,8 +48,7 @@ static inline unsigned long dma_to_pfn(struct device *dev, 
dma_addr_t addr)
unsigned long pfn = __bus_to_pfn(addr);
 
if (dev)
-   pfn += dev->dma_pfn_offset;
-
+   pfn += (dma_offset_from_dma_addr(dev, addr) >> PAGE_SHIFT);
return pfn;
 }
 
diff --git a/arch/arm/mach-keystone/keystone.c 
b/arch/arm/mach-keystone/keystone.c
index 638808c4e122..78808942ad1c 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -8,6 +8,7 @@
  */
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -24,8 +25,6 @@
 
 #include "keystone.h"
 
-static unsigned long keystone_dma_pfn_offset __read_mostly;
-
 static int keystone_platform_notifier(struct notifier_block *nb,
  unsigned long event, void *data)
 {
@@ -38,9 +37,12 @@ static int keystone_platform_notifier(struct notifier_block 
*nb,
return NOTIFY_BAD;
 
if (!dev->of_node) {
-   dev->dma_pfn_offset = keystone_dma_pfn_offset;
-   dev_err(dev, "set dma_pfn_offset%08lx\n",
-   dev->dma_pfn_offset);
+   int ret = dma_set_offset_range(dev, KEYSTONE_HIGH_PHYS_START,
+  KEYSTONE_LOW_PHYS_START,
+  KEYSTONE_HIGH_PHYS_SIZE);
+   dev_err(dev, "set dma_offset%08llx%s\n",
+   KEYSTONE_HIGH_PHYS_START - KEYSTONE_LOW_PHYS_START,
+   ret ? " failed" : "");
}
return NOTIFY_OK;
 }
@@ -51,11 +53,8 @@ static struct notifier_block platform_nb = {
 
 static void __init keystone_init(void)
 {
-   if (PHYS_OFFSET >= KEYSTONE_HIGH_PHYS_START) {
-   keystone_dma_pfn_offset = PFN_DOWN(KEYSTONE_HIGH_PHYS_START -
-  KEYSTONE_LOW_PHYS_START);
+   if (PHYS_O

[PATCH v9 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-24 Thread Jim Quinlan


Patchset Summary:
  Enhance a PCIe host controller driver.  Because of its unusual design
  we are foced to change dev->dma_pfn_offset into a more general role
  allowing multiple offsets.  See the 'v1' notes below for more info.

NOTE: ChristophH wanted the dma_set_offset_range() function
  to have a range from [0...~(phys_addr_t)0], i.e. no specific
  bounds.  RobinM requested this function to have specific bounds,
  which has been implemented since v6.  If I do not hear from
  Robin in the near future about this request, I will submit
  v10 which will have no specific bounds.

v9:
  Commit: "device core: Introduce DMA range map, supplanting ..."
  -- A number of code improvements were implemented as suggested by
 ChristophH.  Unfortunately, some of these changes reversed the
 implemented suggestions of other reviewers; for example, the new
 macros PFN_DMA_ADDR(), DMA_ADDR_PFN() have been pulled.

v8:
  Commit: "device core: Introduce DMA range map, supplanting ..."
  -- To satisfy a specific m68 compile configuration, I moved the 'struct
 bus_dma_region; definition out of #ifdef CONFIG_HAS_DMA and also defined
 three inline functions for !CONFIG_HAS_DMA (kernel test robot).
  -- The sunXi drivers -- suc4i_csi, sun6i_csi, cedrus_hw -- set
 a pfn_offset outside of_dma_configure() but the code offers no 
 insight on the size of the translation window.  V7 had me using
 SIZE_MAX as the size.  I have since contacted the sunXi maintainer and
 he said that using a size of SZ_4G would cover sunXi configurations.

v7:
  Commit: "device core: Introduce DMA range map, supplanting ..."
  -- remove second kcalloc/copy in device.c (AndyS)
  -- use PTR_ERR_OR_ZERO() and PHYS_PFN() (AndyS)
  -- indentation, sizeof(struct ...) => sizeof(*r) (AndyS)
  -- add pfn.h definitions: PFN_DMA_ADDR(), DMA_ADDR_PFN() (AndyS)
  -- Fixed compile error in "sun6i_csi.c" (kernel test robot)
  Commit "ata: ahci_brcm: Fix use of BCM7216 reset controller"
  -- correct name of function in the commit msg (SergeiS)
  
v6:
  Commit "device core: Introduce DMA range map":
  -- of_dma_get_range() now takes a single argument and returns either
 NULL, a valid map, or an ERR_PTR. (Robin)
  -- offsets are no longer a PFN value but an actual address. (Robin)
  -- the bus_dma_region struct stores the range size instead of
 the cpu_end and pci_end values. (Robin)
  -- devices that were setting a single offset with no boundaries
 have been modified to have boundaries; in a few places
 where this information was unavilable a /* FIXME: ... */
 comment was added. (Robin)
  -- dma_attach_offset_range() can be called when an offset
 map already exists; if it's range is already present
 nothing is done and success is returned. (Robin)
  All commits:
  -- Man name/style/corrections/etc changed (Bjorn)
  -- rebase to Torvalds master

v5:
  Commit "device core: Introduce multiple dma pfn offsets"
  -- in of/address.c: "map_size = 0" => "*map_size = 0"
  -- use kcalloc instead of kzalloc (AndyS)
  -- use PHYS_ADDR_MAX instead of "~(phys_addr_t)0"
  Commit "PCI: brcmstb: Set internal memory viewport sizes"
  -- now gives error on missing dma-ranges property.
  Commit "dt-bindings: PCI: Add bindings for more Brcmstb chips"
  -- removed "Allof:" from brcm,scb-sizes definition (RobH)
  All Commits:
  -- indentation style, use max chars 100 (AndyS)
  -- rebased to torvalds master

v4:
  Commit "device core: Introduce multiple dma pfn offsets"
  -- of_dma_get_range() does not take a dev param but instead
 takes two "out" params: map and map_size.  We do this so
 that the code that parses dma-ranges is separate from
 the code that modifies 'dev'.   (Nicolas)
  -- the separate case of having a single pfn offset has
 been removed and is now processed by going through the
 map array. (Nicolas)
  -- move attach_uniform_dma_pfn_offset() from of/address.c to
 dma/mapping.c so that it does not depend on CONFIG_OF. (Nicolas)
  -- devm_kcalloc => devm_kzalloc (DanC)
  -- add/fix assignment to dev->dma_pfn_offset_map for func
 attach_uniform_dma_pfn_offset() (DanC, Nicolas)
  -- s/struct dma_pfn_offset_region/struct bus_dma_region/ (Nicolas)
  -- s/attach_uniform_dma_pfn_offset/dma_attach_uniform_pfn_offset/
  -- s/attach_dma_pfn_offset_map/dma_attach_pfn_offset_map/
  -- More use of PFN_{PHYS,DOWN,UP}. (AndyS)
  Commit "of: Include a dev param in of_dma_get_range()"
  -- this commit was sqaushed with "device core: Introduce ..."

v3:
  Commit "device core: Introduce multiple dma pfn offsets"
  Commit "arm: dma-mapping: Invoke dma offset func if needed"
  -- The above two commits have been squashed.  More importantly,
 the code has been modified so that the functionality for
 multiple pfn offsets subsumes the use of dev->dma_pfn_offset.
 In fact, dma_pfn_offset is removed and supplanted by
 dma_pfn_offset_map, which is a pointer to an array.  The

Re: [PATCH] Fix coding style issues

2020-07-24 Thread Greg Kroah-Hartman
On Sat, Jul 25, 2020 at 01:55:19AM +0530, Anant Thazhemadam wrote:
> Coding style issues found were rectified
> 
> Signed-off-by: Anant Thazhemadam 
> ---
>  drivers/staging/rtl8188eu/core/rtw_security.c | 92 ++-
>  1 file changed, 47 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c 
> b/drivers/staging/rtl8188eu/core/rtw_security.c
> index 21f6652dd69f..3111f4a899ee 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_security.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_security.c
> @@ -127,8 +127,8 @@ static __le32 getcrc32(u8 *buf, int len)
>  }
>  
>  /*
> - Need to consider the fragment  situation
> -*/
> + *   Need to consider the fragment  situation
> + */
>  void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
>  {
>   int curfragnum, length;
> @@ -429,9 +429,9 @@ static const unsigned short Sbox1[2][256] = {  /* Sbox 
> for hash (can be in ROM)
>   0x2DB6, 0x3C22, 0x1592, 0xC920, 0x8749, 0xAAFF, 0x5078, 0xA57A,
>   0x038F, 0x59F8, 0x0980, 0x1A17, 0x65DA, 0xD731, 0x84C6, 0xD0B8,
>   0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A,
> -  },
> +},
>  
> -  {  /* second half of table is unsigned char-reversed version of first! */
> +{  /* second half of table is unsigned char-reversed version of first! */
>   0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491,
>   0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC,
>   0x458F, 0x9D1F, 0x4089, 0x87FA, 0x15EF, 0xEBB2, 0xC98E, 0x0BFB,
> @@ -464,26 +464,26 @@ static const unsigned short Sbox1[2][256] = {  /* Sbox 
> for hash (can be in ROM)
>   0xB62D, 0x223C, 0x9215, 0x20C9, 0x4987, 0xFFAA, 0x7850, 0x7AA5,
>   0x8F03, 0xF859, 0x8009, 0x171A, 0xDA65, 0x31D7, 0xC684, 0xB8D0,
>   0xC382, 0xB029, 0x775A, 0x111E, 0xCB7B, 0xFCA8, 0xD66D, 0x3A2C,
> -  }
> +}
>  };
>  
> - /*
> -**
> -* Routine: Phase 1 -- generate P1K, given TA, TK, IV32
> -*
> -* Inputs:
> -* tk[]  = temporal key[128 bits]
> -* ta[]  = transmitter's MAC address  [ 48 bits]
> -* iv32  = upper 32 bits of IV  [ 32 bits]
> -* Output:
> -* p1k[] = Phase 1 key  [ 80 bits]
> -*
> -* Note:
> -* This function only needs to be called every 2**16 packets,
> -* although in theory it could be called every packet.
> -*
> -**
> -*/
> +/*
> + **
> + * Routine: Phase 1 -- generate P1K, given TA, TK, IV32
> + *
> + * Inputs:
> + * tk[]  = temporal key   [128 bits]
> + * ta[]  = transmitter's MAC address [ 48 bits]
> + * iv32  = upper 32 bits of IV [ 32 bits]
> + * Output:
> + * p1k[] = Phase 1 key [ 80 bits]
> + *
> + * Note:
> + * This function only needs to be called every 2**16 packets,
> + * although in theory it could be called every packet.
> + *
> + **
> + */
>  static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
>  {
>   int  i;
> @@ -507,28 +507,28 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 
> *ta, u32 iv32)
>  }
>  
>  /*
> -**
> -* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
> -*
> -* Inputs:
> -* tk[]  = Temporal key[128 bits]
> -* p1k[] = Phase 1 output key[ 80 bits]
> -* iv16  = low 16 bits of IV counter  [ 16 bits]
> -* Output:
> -* rc4key[]  = the key used to encrypt the packet   [128 bits]
> -*
> -* Note:
> -* The value {TA, IV32, IV16} for Phase1/Phase2 must be unique
> -* across all packets using the same key TK value. Then, for a
> -* given value of TK[], this TKIP48 construction guarantees that
> -* the final RC4KEY value is unique across all packets.
> -*
> -* Suggested implementation optimization: if PPK[] is "overlaid"
> -* appropriately on RC4KEY[], there is no need for the final
> -* for loop below that copies the PPK[] result into RC4KEY[].
> -*
> -**
> -*/
> + **
> + * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
> + *
> + * Inputs:
> + * tk[]  = Temporal key   [128 bits]
> + * p1k[] = Phase 1 output key   [ 80 bits]
> + * iv16  = low 16 bits of IV counter [ 16 bits]
> + * Output:
> + * rc4key[]  = the key used to encrypt the packet   [128 bits]
> + *
> + * Note:
> + * The value {TA, IV32, IV16} for Phase1/Phase2 must be unique
> + * ac

RE

2020-07-24 Thread Mrs. Maureen Hinckley


I am Maureen Hinckley and my foundation is donating (Five hundred and fifty 
thousand USD) to you. Contact us via my email at (maurhin...@gmail.com) for 
further details.

Best Regards,
Mrs. Maureen Hinckley,
Copyright ©2020 The Maureen Hinckley Foundation All Rights Reserved.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Rohit K Bharadwaj
changed usage of slave (which is deprecated) to secondary without breaking the 
driver

Tested-by: Dan Carpenter 
Acked-by: Marc Dietrich 
Signed-off-by: Rohit K Bharadwaj 
---
v4: undo the changes (which broke the driver) to this line: if 
(of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr)) 
v3: change patch subject, add version history
v2: add changelog text in body of mail
v1: fix style issues by changing usage of slave to secondary

 drivers/staging/nvec/nvec.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 360ec0407740..a7e995bfe989 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
return IRQ_HANDLED;
 }
 
-static void tegra_init_i2c_slave(struct nvec_chip *nvec)
+static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
 {
u32 val;
 
@@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
 }
 
 #ifdef CONFIG_PM_SLEEP
-static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
+static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
 {
disable_irq(nvec->irq);
writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
@@ -839,7 +839,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
}
disable_irq(nvec->irq);
 
-   tegra_init_i2c_slave(nvec);
+   tegra_init_i2c_secondary(nvec);
 
/* enable event reporting */
nvec_toggle_global_events(nvec, true);
@@ -913,7 +913,7 @@ static int nvec_suspend(struct device *dev)
if (!err)
nvec_msg_free(nvec, msg);
 
-   nvec_disable_i2c_slave(nvec);
+   nvec_disable_i2c_secondary(nvec);
 
return 0;
 }
@@ -923,7 +923,7 @@ static int nvec_resume(struct device *dev)
struct nvec_chip *nvec = dev_get_drvdata(dev);
 
dev_dbg(nvec->dev, "resuming\n");
-   tegra_init_i2c_slave(nvec);
+   tegra_init_i2c_secondary(nvec);
nvec_toggle_global_events(nvec, true);
 
return 0;
-- 
2.25.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: nvec: change usage of slave to secondary

2020-07-24 Thread Rohit K Bharadwaj
On 25/07/20 2:12 am, Marc Dietrich wrote:
> 
> Hi Rohit,
> 
> On Fri, 24 Jul 2020, Rohit K Bharadwaj wrote:
> 
>> On 24/07/20 10:06 pm, Marc Dietrich wrote:
>>>
>>>
>>> On Fri, 24 Jul 2020, Marc Dietrich wrote:
>>>
 Hi Rohit,

 On Fri, 24 Jul 2020, Rohit Bharadwaj wrote:

> On 24/07/20 1:58 pm, Greg KH wrote:
>> On Fri, Jul 24, 2020 at 01:44:27PM +0530, Rohit Bharadwaj wrote:
>>> On 24/07/20 10:06 am, Rohit K Bharadwaj wrote:
 changed usage of slave (deprecated) to secondary

 Signed-off-by: Rohit K Bharadwaj 
 ---
 v3: change patch subject, add version history
 v2: add changelog text in body of mail
 v1: fix style issues by changing usage of slave to secondary

  drivers/staging/nvec/nvec.c | 12 ++--
  1 file changed, 6 insertions(+), 6 deletions(-)

 diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
 index 360ec0407740..5d7b66719a39 100644
 --- a/drivers/staging/nvec/nvec.c
 +++ b/drivers/staging/nvec/nvec.c
 @@ -718,7 +718,7 @@ static irqreturn_t nvec_interrupt(int irq, void 
 *dev)
  return IRQ_HANDLED;
  }

 -static void tegra_init_i2c_slave(struct nvec_chip *nvec)
 +static void tegra_init_i2c_secondary(struct nvec_chip *nvec)
  {
  u32 val;

 @@ -744,7 +744,7 @@ static void tegra_init_i2c_slave(struct nvec_chip 
 *nvec)
  }

  #ifdef CONFIG_PM_SLEEP
 -static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
 +static void nvec_disable_i2c_secondary(struct nvec_chip *nvec)
  {
  disable_irq(nvec->irq);
  writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
 @@ -784,7 +784,7 @@ static int tegra_nvec_probe(struct platform_device 
 *pdev)
  platform_set_drvdata(pdev, nvec);
  nvec->dev = dev;

 -    if (of_property_read_u32(dev->of_node, "slave-addr", 
 &nvec->i2c_addr)) {
 +    if (of_property_read_u32(dev->of_node, "secondary-addr", 
 &nvec->i2c_addr)) {
  dev_err(dev, "no i2c address specified");
  return -ENODEV;
  }

 as Christoph said, please don't change this line.
>>>
>>> arr, I meant Dan of course ;-)
>> Dear all, thank you so much for your inputs, I will try to make some other 
>> patch which will not break the driver (hopefully :p), or if you give me 
>> permission to submit this patch itself by just keeping this one line
>>
>>> if (of_property_read_u32(dev->of_node, "slave-addr", &nvec->i2c_addr))
>>
>> unchanged, and provided it does not break the driver by doing so, I would 
>> gladly make the changes and submit v4 of the patch.
> 
> please resend the patch with the line above unchanged as v4. Don't forget to 
> to update the changelog to the commit message. I tested your patch (without 
> the dt property change) and it does not change behavoir - as expected,
> so you will recevice my Ack.
> 
> Marc

Thank you so much for the suggestions and the Ack sir, I have made the 
necessary changes and I have sent the v4 of the patch.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel