outreachy.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2023-03-17 16:36 Sumitra Sharma
  2023-03-17 16:47 ` your mail Julia Lawall
  0 siblings, 1 reply; 11+ messages in thread
From: Sumitra Sharma @ 2023-03-17 16:36 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: Linux Outreachy, julia.lawall

, fmdefrancesco@gmail.com
Bcc: 
Subject: Re: [KERNEL NEWBIES ACCESS] Sumitra Sharma
Reply-To: 
In-Reply-To: <936dcbf3-0bf3-0461-1ea5-d71e0e60fa88@gmail.com>

On Wed, Mar 15, 2023 at 03:41:40PM +0700, Bagas Sanjaya wrote:
> On 3/14/23 19:33, Sumitra Sharma wrote:
> >> On Outreachyfirstpatch, there is a pointer to Outreachyfirstpatchalt
> >> (which contains instructions on spinning up Ubuntu VM), so you need to
> >> install your tools (including postfix and mutt) there if you want to
> >> contribute through there. So I think the latter doc should be kept as
> >> is.
> >>
> > 
> > Hi
> > 
> > Can you send me a link to Outreachyfirstpatchalt, I am unable to find
> > it.
> > 
> 
> For your completeness, see https://kernelnewbies.org/OutreachyfirstpatchAlt.
> 
> Again, what I mean that OutreachyfirstpatchAlt is about spinning up
> Linux VM. If you need follow setting up tools in Outreachyfirstpatch,
> you can do that in the VM. So I suggest not to modify OutreachyfirstpatchAlt
> for now. (But I wish the slug could be better named as LinuxVMSetup).
>

Hi,

Since we discussed all about the outreachyfirstpatchalt only and you
also suggested not to modify it for now. I want to clarify that whether we are working on these below changes for the "outreachyfirstpatch". I am again mentioning them below.

1. The outreachy document does not include the steps to make the inbox with mutt. The steps below can be added to configure mutt with gmail.

	- Open the ~/.muttrc
	- Add the information

		set sendmail="/usr/bin/esmtp"
		set envelope_from=yes
		set from="Your Name <my.email@gmail.com>"
		set use_from=yes
		set edit_headers=yes

		# IMAP settings
		set imap_user = "username@gmail.com"
		set imap_pass = "<mailbox password>"

		# SMTP settings
		set smtp_url = "smtps://username@smtp.gmail.com"
		set smtp_pass = "<mailbox password>"

		# Remote Gmail folders
		set folder = "imaps://imap.gmail.com/"
		set spoolfile = "+INBOX"
		set postponed = "+[Gmail]/Drafts"
		set record = "+[Gmail]/Sent Mail"
		set trash = "+[Gmail]/Trash"

	- Where the imap_pass, smtp_pass would be the App password or
	  the mailbox password.


Regards,

Sumitra

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-17 16:36 Sumitra Sharma
@ 2023-03-17 16:47 ` Julia Lawall
  2023-03-17 18:17   ` Sumitra Sharma
  2023-03-19  8:09   ` Sumitra Sharma
  0 siblings, 2 replies; 11+ messages in thread
From: Julia Lawall @ 2023-03-17 16:47 UTC (permalink / raw)
  To: Sumitra Sharma; +Cc: Bagas Sanjaya, Linux Outreachy



On Fri, 17 Mar 2023, Sumitra Sharma wrote:

> , fmdefrancesco@gmail.com
> Bcc:
> Subject: Re: [KERNEL NEWBIES ACCESS] Sumitra Sharma
> Reply-To:
> In-Reply-To: <936dcbf3-0bf3-0461-1ea5-d71e0e60fa88@gmail.com>
>
> On Wed, Mar 15, 2023 at 03:41:40PM +0700, Bagas Sanjaya wrote:
> > On 3/14/23 19:33, Sumitra Sharma wrote:
> > >> On Outreachyfirstpatch, there is a pointer to Outreachyfirstpatchalt
> > >> (which contains instructions on spinning up Ubuntu VM), so you need to
> > >> install your tools (including postfix and mutt) there if you want to
> > >> contribute through there. So I think the latter doc should be kept as
> > >> is.
> > >>
> > >
> > > Hi
> > >
> > > Can you send me a link to Outreachyfirstpatchalt, I am unable to find
> > > it.
> > >
> >
> > For your completeness, see https://kernelnewbies.org/OutreachyfirstpatchAlt.
> >
> > Again, what I mean that OutreachyfirstpatchAlt is about spinning up
> > Linux VM. If you need follow setting up tools in Outreachyfirstpatch,
> > you can do that in the VM. So I suggest not to modify OutreachyfirstpatchAlt
> > for now. (But I wish the slug could be better named as LinuxVMSetup).
> >
>
> Hi,
>
> Since we discussed all about the outreachyfirstpatchalt only and you
> also suggested not to modify it for now. I want to clarify that whether we are working on these below changes for the "outreachyfirstpatch". I am again mentioning them below.

In https://kernelnewbies.org/Outreachyfirstpatch, there is a section
called Set up email.  This is followed by some sections related to gmail,
yahoo, etc.  So you could find the best place around there for the new
information.

It could be nice to use some subsections, so that one can easily identify
the complete section about email.

I notice also that there seems to be randomly "set up" and "setup".  I
have the impression that "set up" is a verb and "setup" is a noun., so it
should be "Set up vim as your default editor" (not Setup...) and it should
be "Gmail setup" (not Gmail set up).

thanks,
julia

>
> 1. The outreachy document does not include the steps to make the inbox with mutt. The steps below can be added to configure mutt with gmail.
>
> 	- Open the ~/.muttrc
> 	- Add the information
>
> 		set sendmail="/usr/bin/esmtp"
> 		set envelope_from=yes
> 		set from="Your Name <my.email@gmail.com>"
> 		set use_from=yes
> 		set edit_headers=yes
>
> 		# IMAP settings
> 		set imap_user = "username@gmail.com"
> 		set imap_pass = "<mailbox password>"
>
> 		# SMTP settings
> 		set smtp_url = "smtps://username@smtp.gmail.com"
> 		set smtp_pass = "<mailbox password>"
>
> 		# Remote Gmail folders
> 		set folder = "imaps://imap.gmail.com/"
> 		set spoolfile = "+INBOX"
> 		set postponed = "+[Gmail]/Drafts"
> 		set record = "+[Gmail]/Sent Mail"
> 		set trash = "+[Gmail]/Trash"
>
> 	- Where the imap_pass, smtp_pass would be the App password or
> 	  the mailbox password.
>
>
> Regards,
>
> Sumitra
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-17 16:47 ` your mail Julia Lawall
@ 2023-03-17 18:17   ` Sumitra Sharma
  2023-03-19  8:09   ` Sumitra Sharma
  1 sibling, 0 replies; 11+ messages in thread
From: Sumitra Sharma @ 2023-03-17 18:17 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Bagas Sanjaya, Linux Outreachy

On Fri, Mar 17, 2023 at 05:47:23PM +0100, Julia Lawall wrote:
> 
> 
> On Fri, 17 Mar 2023, Sumitra Sharma wrote:
> 
> > , fmdefrancesco@gmail.com
> > Bcc:
> > Subject: Re: [KERNEL NEWBIES ACCESS] Sumitra Sharma
> > Reply-To:
> > In-Reply-To: <936dcbf3-0bf3-0461-1ea5-d71e0e60fa88@gmail.com>
> >
> > On Wed, Mar 15, 2023 at 03:41:40PM +0700, Bagas Sanjaya wrote:
> > > On 3/14/23 19:33, Sumitra Sharma wrote:
> > > >> On Outreachyfirstpatch, there is a pointer to Outreachyfirstpatchalt
> > > >> (which contains instructions on spinning up Ubuntu VM), so you need to
> > > >> install your tools (including postfix and mutt) there if you want to
> > > >> contribute through there. So I think the latter doc should be kept as
> > > >> is.
> > > >>
> > > >
> > > > Hi
> > > >
> > > > Can you send me a link to Outreachyfirstpatchalt, I am unable to find
> > > > it.
> > > >
> > >
> > > For your completeness, see https://kernelnewbies.org/OutreachyfirstpatchAlt.
> > >
> > > Again, what I mean that OutreachyfirstpatchAlt is about spinning up
> > > Linux VM. If you need follow setting up tools in Outreachyfirstpatch,
> > > you can do that in the VM. So I suggest not to modify OutreachyfirstpatchAlt
> > > for now. (But I wish the slug could be better named as LinuxVMSetup).
> > >
> >
> > Hi,
> >
> > Since we discussed all about the outreachyfirstpatchalt only and you
> > also suggested not to modify it for now. I want to clarify that whether we are working on these below changes for the "outreachyfirstpatch". I am again mentioning them below.
> 
> In https://kernelnewbies.org/Outreachyfirstpatch, there is a section
> called Set up email.  This is followed by some sections related to gmail,
> yahoo, etc.  So you could find the best place around there for the new
> information.
> 
> It could be nice to use some subsections, so that one can easily identify
> the complete section about email.
> 

Actually, the only issue I faced was that the outreachyfirstpatch
document do not contain the informatio of how to set your inbox in mutt.
Due to which I was facing issues to send and reply mails. This below
configuration update will enable the inbox at the client side.

How about this...

Under the section "Configure esmtp":

###
Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:

Note: The imap_pass, smtp_pass would be the App password or
 	  the mailbox password.

 		set sendmail="/usr/bin/esmtp"
 		set envelope_from=yes
 		set from="Your Name <my.email@gmail.com>"
 		set use_from=yes
 		set edit_headers=yes

 		# IMAP settings
 		set imap_user = "username@gmail.com"
 		set imap_pass = "<mailbox password>"

 		# SMTP settings
 		set smtp_url = "smtps://username@smtp.gmail.com"
 		set smtp_pass = "<mailbox password>"

 		# Remote Gmail folders
 		set folder = "imaps://imap.gmail.com/"
 		set spoolfile = "+INBOX"
 		set postponed = "+[Gmail]/Drafts"
 		set record = "+[Gmail]/Sent Mail"
 		set trash = "+[Gmail]/Trash"
###
> I notice also that there seems to be randomly "set up" and "setup".  I
> have the impression that "set up" is a verb and "setup" is a noun., so it
> should be "Set up vim as your default editor" (not Setup...) and it should
> be "Gmail setup" (not Gmail set up).
>

Okay! I will take care of it. Thank you.

Regards,

Sumitra

> thanks,
> julia
> 
> >
> > 1. The outreachy document does not include the steps to make the inbox with mutt. The steps below can be added to configure mutt with gmail.
> >
> > 	- Open the ~/.muttrc
> > 	- Add the information
> >
> > 		set sendmail="/usr/bin/esmtp"
> > 		set envelope_from=yes
> > 		set from="Your Name <my.email@gmail.com>"
> > 		set use_from=yes
> > 		set edit_headers=yes
> >
> > 		# IMAP settings
> > 		set imap_user = "username@gmail.com"
> > 		set imap_pass = "<mailbox password>"
> >
> > 		# SMTP settings
> > 		set smtp_url = "smtps://username@smtp.gmail.com"
> > 		set smtp_pass = "<mailbox password>"
> >
> > 		# Remote Gmail folders
> > 		set folder = "imaps://imap.gmail.com/"
> > 		set spoolfile = "+INBOX"
> > 		set postponed = "+[Gmail]/Drafts"
> > 		set record = "+[Gmail]/Sent Mail"
> > 		set trash = "+[Gmail]/Trash"
> >
> > 	- Where the imap_pass, smtp_pass would be the App password or
> > 	  the mailbox password.
> >
> >
> > Regards,
> >
> > Sumitra
> >
> >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-17 16:47 ` your mail Julia Lawall
  2023-03-17 18:17   ` Sumitra Sharma
@ 2023-03-19  8:09   ` Sumitra Sharma
  2023-03-19  8:35     ` Julia Lawall
  1 sibling, 1 reply; 11+ messages in thread
From: Sumitra Sharma @ 2023-03-19  8:09 UTC (permalink / raw)
  To: sumitraartsy, bagasdotme, julia.lawall, outreachy

On Fri, Mar 17, 2023 at 05:47:23PM +0100, Julia Lawall wrote:
> 
> 
> On Fri, 17 Mar 2023, Sumitra Sharma wrote:
> 
> > , fmdefrancesco@gmail.com
> > Bcc:
> > Subject: Re: [KERNEL NEWBIES ACCESS] Sumitra Sharma
> > Reply-To:
> > In-Reply-To: <936dcbf3-0bf3-0461-1ea5-d71e0e60fa88@gmail.com>
> >
> > On Wed, Mar 15, 2023 at 03:41:40PM +0700, Bagas Sanjaya wrote:
> > > On 3/14/23 19:33, Sumitra Sharma wrote:
> > > >> On Outreachyfirstpatch, there is a pointer to Outreachyfirstpatchalt
> > > >> (which contains instructions on spinning up Ubuntu VM), so you need to
> > > >> install your tools (including postfix and mutt) there if you want to
> > > >> contribute through there. So I think the latter doc should be kept as
> > > >> is.
> > > >>
> > > >
> > > > Hi
> > > >
> > > > Can you send me a link to Outreachyfirstpatchalt, I am unable to find
> > > > it.
> > > >
> > >
> > > For your completeness, see https://kernelnewbies.org/OutreachyfirstpatchAlt.
> > >
> > > Again, what I mean that OutreachyfirstpatchAlt is about spinning up
> > > Linux VM. If you need follow setting up tools in Outreachyfirstpatch,
> > > you can do that in the VM. So I suggest not to modify OutreachyfirstpatchAlt
> > > for now. (But I wish the slug could be better named as LinuxVMSetup).
> > >
> >
> > Hi,
> >
> > Since we discussed all about the outreachyfirstpatchalt only and you
> > also suggested not to modify it for now. I want to clarify that whether we are working on these below changes for the "outreachyfirstpatch". I am again mentioning them below.
> 
> In https://kernelnewbies.org/Outreachyfirstpatch, there is a section
> called Set up email.  This is followed by some sections related to gmail,
> yahoo, etc.  So you could find the best place around there for the new
> information.
> 
> It could be nice to use some subsections, so that one can easily identify
> the complete section about email.
> 

Actually, the only issue I faced was that the outreachyfirstpatch
document does not contain the information of how one can set their inbox in mutt.
Due to which I had problems to send and reply mails. This below
configuration update will enable the inbox at the client side.

How about this...

Under the section "Configure esmtp":

###
Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:

Note: The imap_pass, smtp_pass would be the App password or
 	  the mailbox password.

 		set sendmail="/usr/bin/esmtp"
 		set envelope_from=yes
 		set from="Your Name <my.email@gmail.com>"
 		set use_from=yes
 		set edit_headers=yes

 		# IMAP settings
 		set imap_user = "username@gmail.com"
 		set imap_pass = "<mailbox password>"

 		# SMTP settings
 		set smtp_url = "smtps://username@smtp.gmail.com"
 		set smtp_pass = "<mailbox password>"

 		# Remote Gmail folders
 		set folder = "imaps://imap.gmail.com/"
 		set spoolfile = "+INBOX"
 		set postponed = "+[Gmail]/Drafts"
 		set record = "+[Gmail]/Sent Mail"
 		set trash = "+[Gmail]/Trash"
###
> I notice also that there seems to be randomly "set up" and "setup".  I
> have the impression that "set up" is a verb and "setup" is a noun., so it
> should be "Set up vim as your default editor" (not Setup...) and it should
> be "Gmail setup" (not Gmail set up).
>

Okay! I will take care of it. Thank you.

In addition to this, I would like to bring to your notice that a hyperlink
in outrachyfirstpatch document, under the section "Git post-commit
hooks" does not work and it must be changed.

under Git post-commit hooks; checkpatch.pl:
http://lxr.free-electrons.com/source/scripts/checkpatch.pl
------------------------------------------------------------------
https://elixir.bootlin.com/linux/latest/source/scripts/checkpatch.pl




Regards,

Sumitra

> thanks,
> julia
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-19  8:09   ` Sumitra Sharma
@ 2023-03-19  8:35     ` Julia Lawall
  2023-03-19  8:56       ` Sumitra Sharma
  0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2023-03-19  8:35 UTC (permalink / raw)
  To: Sumitra Sharma; +Cc: bagasdotme, outreachy

> Actually, the only issue I faced was that the outreachyfirstpatch
> document does not contain the information of how one can set their inbox in mutt.
> Due to which I had problems to send and reply mails. This below
> configuration update will enable the inbox at the client side.
>
> How about this...
>
> Under the section "Configure esmtp":
>
> ###
> Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:
>
> Note: The imap_pass, smtp_pass would be the App password or
>  	  the mailbox password.
>
>  		set sendmail="/usr/bin/esmtp"
>  		set envelope_from=yes
>  		set from="Your Name <my.email@gmail.com>"
>  		set use_from=yes
>  		set edit_headers=yes
>
>  		# IMAP settings
>  		set imap_user = "username@gmail.com"
>  		set imap_pass = "<mailbox password>"
>
>  		# SMTP settings
>  		set smtp_url = "smtps://username@smtp.gmail.com"
>  		set smtp_pass = "<mailbox password>"
>
>  		# Remote Gmail folders
>  		set folder = "imaps://imap.gmail.com/"
>  		set spoolfile = "+INBOX"
>  		set postponed = "+[Gmail]/Drafts"
>  		set record = "+[Gmail]/Sent Mail"
>  		set trash = "+[Gmail]/Trash"
> ###

Does this have anything to do with esmpt?

Does "<mailbox password>" mean that you have to put your password in plain
text?

julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-19  8:35     ` Julia Lawall
@ 2023-03-19  8:56       ` Sumitra Sharma
  2023-03-19  9:02         ` Julia Lawall
  0 siblings, 1 reply; 11+ messages in thread
From: Sumitra Sharma @ 2023-03-19  8:56 UTC (permalink / raw)
  To: Julia Lawall; +Cc: bagasdotme, outreachy

On Sun, Mar 19, 2023 at 09:35:50AM +0100, Julia Lawall wrote:
> > Actually, the only issue I faced was that the outreachyfirstpatch
> > document does not contain the information of how one can set their inbox in mutt.
> > Due to which I had problems to send and reply mails. This below
> > configuration update will enable the inbox at the client side.
> >
> > How about this...
> >
> > Under the section "Configure esmtp":
> >
> > ###
> > Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:
> >
> > Note: The imap_pass, smtp_pass would be the App password or
> >  	  the mailbox password.
> >
> >  		set sendmail="/usr/bin/esmtp"
> >  		set envelope_from=yes
> >  		set from="Your Name <my.email@gmail.com>"
> >  		set use_from=yes
> >  		set edit_headers=yes
> >
> >  		# IMAP settings
> >  		set imap_user = "username@gmail.com"
> >  		set imap_pass = "<mailbox password>"
> >
> >  		# SMTP settings
> >  		set smtp_url = "smtps://username@smtp.gmail.com"
> >  		set smtp_pass = "<mailbox password>"
> >
> >  		# Remote Gmail folders
> >  		set folder = "imaps://imap.gmail.com/"
> >  		set spoolfile = "+INBOX"
> >  		set postponed = "+[Gmail]/Drafts"
> >  		set record = "+[Gmail]/Sent Mail"
> >  		set trash = "+[Gmail]/Trash"
> > ###
> 
> Does this have anything to do with esmpt?
>

In the current version of the outreachy firstpatch document the configuration 
steps for .esmtp and .muttrc are written under the heading
"Configure esmtp" and also to configure esmtp we are creating the muttrc
file. So, both are linked in a way.

> Does "<mailbox password>" mean that you have to put your password in plain
> text?
> 

Yes, but it is always prefered to use the app password for better security.


Regards,

Sumitra

> julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-19  8:56       ` Sumitra Sharma
@ 2023-03-19  9:02         ` Julia Lawall
  2023-03-19  9:53           ` Sumitra Sharma
  0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2023-03-19  9:02 UTC (permalink / raw)
  To: Sumitra Sharma; +Cc: bagasdotme, outreachy



On Sun, 19 Mar 2023, Sumitra Sharma wrote:

> On Sun, Mar 19, 2023 at 09:35:50AM +0100, Julia Lawall wrote:
> > > Actually, the only issue I faced was that the outreachyfirstpatch
> > > document does not contain the information of how one can set their inbox in mutt.
> > > Due to which I had problems to send and reply mails. This below
> > > configuration update will enable the inbox at the client side.
> > >
> > > How about this...
> > >
> > > Under the section "Configure esmtp":
> > >
> > > ###
> > > Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:
> > >
> > > Note: The imap_pass, smtp_pass would be the App password or
> > >  	  the mailbox password.
> > >
> > >  		set sendmail="/usr/bin/esmtp"
> > >  		set envelope_from=yes
> > >  		set from="Your Name <my.email@gmail.com>"
> > >  		set use_from=yes
> > >  		set edit_headers=yes
> > >
> > >  		# IMAP settings
> > >  		set imap_user = "username@gmail.com"
> > >  		set imap_pass = "<mailbox password>"
> > >
> > >  		# SMTP settings
> > >  		set smtp_url = "smtps://username@smtp.gmail.com"
> > >  		set smtp_pass = "<mailbox password>"
> > >
> > >  		# Remote Gmail folders
> > >  		set folder = "imaps://imap.gmail.com/"
> > >  		set spoolfile = "+INBOX"
> > >  		set postponed = "+[Gmail]/Drafts"
> > >  		set record = "+[Gmail]/Sent Mail"
> > >  		set trash = "+[Gmail]/Trash"
> > > ###
> >
> > Does this have anything to do with esmpt?
> >
>
> In the current version of the outreachy firstpatch document the configuration
> steps for .esmtp and .muttrc are written under the heading
> "Configure esmtp" and also to configure esmtp we are creating the muttrc
> file. So, both are linked in a way.

I don't think so.  Comfiguring esmtp requires adding some information to
the .muttrc, but people who don't want to configure esmtp may also want to
add information to the .muttrc.

>
> > Does "<mailbox password>" mean that you have to put your password in plain
> > text?
> >
>
> Yes, but it is always prefered to use the app password for better security.

The existing text about sending mesages with mutt says:

identity "my.email@gmail.com"
hostname smtp.gmail.com:587
username "my.email@gmail.com"
password "ThisIsNotARealPassWord"
starttls required

Why not put "ThisIsNotARealPassWord" in your text as well, if that is
what you expect people to do?

That is, when you put something in quotes, the reader doedn't know whether
they are supposed to put exactly the thing that you have put in the quotes
or something else.  I guess that for eg "smtps://username@smtp.gmail.com"
they should fill in their real username.  But for "<mailbox password>" it
is not clear what is expected.

julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-03-19  9:02         ` Julia Lawall
@ 2023-03-19  9:53           ` Sumitra Sharma
  0 siblings, 0 replies; 11+ messages in thread
From: Sumitra Sharma @ 2023-03-19  9:53 UTC (permalink / raw)
  To: Julia Lawall; +Cc: bagasdotme, outreachy

On Sun, Mar 19, 2023 at 10:02:46AM +0100, Julia Lawall wrote:
> 
> 
> On Sun, 19 Mar 2023, Sumitra Sharma wrote:
> 
> > On Sun, Mar 19, 2023 at 09:35:50AM +0100, Julia Lawall wrote:
> > > > Actually, the only issue I faced was that the outreachyfirstpatch
> > > > document does not contain the information of how one can set their inbox in mutt.
> > > > Due to which I had problems to send and reply mails. This below
> > > > configuration update will enable the inbox at the client side.
> > > >
> > > > How about this...
> > > >
> > > > Under the section "Configure esmtp":
> > > >
> > > > ###
> > > > Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:
> > > >
> > > > Note: The imap_pass, smtp_pass would be the App password or
> > > >  	  the mailbox password.
> > > >
> > > >  		set sendmail="/usr/bin/esmtp"
> > > >  		set envelope_from=yes
> > > >  		set from="Your Name <my.email@gmail.com>"
> > > >  		set use_from=yes
> > > >  		set edit_headers=yes
> > > >
> > > >  		# IMAP settings
> > > >  		set imap_user = "username@gmail.com"
> > > >  		set imap_pass = "<mailbox password>"
> > > >
> > > >  		# SMTP settings
> > > >  		set smtp_url = "smtps://username@smtp.gmail.com"
> > > >  		set smtp_pass = "<mailbox password>"
> > > >
> > > >  		# Remote Gmail folders
> > > >  		set folder = "imaps://imap.gmail.com/"
> > > >  		set spoolfile = "+INBOX"
> > > >  		set postponed = "+[Gmail]/Drafts"
> > > >  		set record = "+[Gmail]/Sent Mail"
> > > >  		set trash = "+[Gmail]/Trash"
> > > > ###
> > >
> > > Does this have anything to do with esmpt?
> > >
> >
> > In the current version of the outreachy firstpatch document the configuration
> > steps for .esmtp and .muttrc are written under the heading
> > "Configure esmtp" and also to configure esmtp we are creating the muttrc
> > file. So, both are linked in a way.
> 
> I don't think so.  Comfiguring esmtp requires adding some information to
> the .muttrc, but people who don't want to configure esmtp may also want to
> add information to the .muttrc.
>

Then, why dont we rename the section as "Configure MTA"

then it will go as follows:

> >
> > > Does "<mailbox password>" mean that you have to put your password in plain
> > > text?
> > >
> >
> > Yes, but it is always prefered to use the app password for better security.
> 
> The existing text about sending mesages with mutt says:
> 
> identity "my.email@gmail.com"
> hostname smtp.gmail.com:587
> username "my.email@gmail.com"
> password "ThisIsNotARealPassWord"
> starttls required
> 
> Why not put "ThisIsNotARealPassWord" in your text as well, if that is
> what you expect people to do?
> 
> That is, when you put something in quotes, the reader doedn't know whether
> they are supposed to put exactly the thing that you have put in the quotes
> or something else.  I guess that for eg "smtps://username@smtp.gmail.com"
> they should fill in their real username.  But for "<mailbox password>" it
> is not clear what is expected.
> 

###
Configure MTA

Note: These instructions assume you're using esmtp, but if you already have another mail transfer agent (MTA) installed, you do not need to install esmtp. Instead, change the .muttrc file "sendmail" line to be the path to your MTA. Mutt uses ssmtp by default, so if your MTA is ssmtp, you can leave that line out entirely.

First, create a .esmtprc file with the right permissions:


			touch ~/.esmtprc
			chmod g-rwx ~/.esmtprc
			chmod o-rwx ~/.esmtprc

Edit the .esmtprc in your home directory, and add lines like this:

			identity "my.email@gmail.com"
			hostname smtp.gmail.com:587
			username "my.email@gmail.com"
			password "ThisIsNotARealPassWord"
			starttls required 

(For Yahoo mail, replace hostname line with:

			hostname smtp.mail.yahoo.com:587

Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your homedirectory:
 Note: The imap_pass, smtp_pass would be the App password or the mailbox password.


	           set sendmail="/usr/bin/esmtp"
	           set envelope_from=yes
	           set from="Your Name <my.email@gmail.com>"
	           set use_from=yes
		     set edit_headers=yes

                 # IMAP settings
                 set imap_user = "username@gmail.com"
                 set imap_pass = "<ThisIsNotARealPassWord>"

                 # SMTP settings
                 set smtp_url = "smtps://username@smtp.gmail.com"
                 set smtp_pass = "<ThisIsNotARealPassWord>"

                 # Remote Gmail folders
                 set folder = "imaps://imap.gmail.com/"
                 set spoolfile = "+INBOX"
                 set postponed = "+[Gmail]/Drafts"
                 set record = "+[Gmail]/Sent Mail"
                 set trash = "+[Gmail]/Trash"


###


Regards,

Sumitra

> julia

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-10-16 12:42   ` Gilbert Adikankwu
@ 2023-10-16 13:23     ` Julia Lawall
  0 siblings, 0 replies; 11+ messages in thread
From: Julia Lawall @ 2023-10-16 13:23 UTC (permalink / raw)
  To: Gilbert Adikankwu; +Cc: outreachy, linux-staging, linux-kernel, gregkh



On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:

> On Mon, Oct 16, 2023 at 02:34:48PM +0200, Julia Lawall wrote:
> >
> >
> > On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
> >
> > > linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
> > > Bcc:
> > > Subject: Re: [PATCH] staging: emxx_udc: Remove unnecessary parentheses around
> > >  condition tests
> > > Reply-To:
> > > In-Reply-To: <6b60ed7-9d97-2071-44f8-83b173191ed@inria.fr>
> > >
> > > On Mon, Oct 16, 2023 at 02:15:06PM +0200, Julia Lawall wrote:
> > > >
> > > >
> > > > On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
> > > >
> > > > > Fix 47 warnings detected by checkpatch.pl about unnecessary parenthesis
> > > > > around condition tests.
> > > >
> > > > If you need to make any changes to the patch, there is no need to give the
> > > > count of the changes.  It doesn't matter if it's 47, 46, 35, etc.
> > > >
> > > > julia
> > > >
> > > Hi Julia,
> > >
> > > I added the number because I saw I similar commit on the logs that did
> > > so. (commit b83970f23f36f0e2968872140e69f68118d82fe3)
> >
> > OK, I still think it's pointless...  The person who looks at the commit 5
> > years from now won't care about this information.  They care about what
> > you did and why.
> >
> > julia
> >
> Ok that make sense. I will revise it. Do I send revision patch now or
> later today?

You can wait, in case there are other comments.

julia

> >
> > > > >
> > > > > Signed-off-by: Gilbert Adikankwu <gilbertadikankwu@gmail.com>
> > > > > ---
> > > > >  drivers/staging/emxx_udc/emxx_udc.c | 72 ++++++++++++++---------------
> > > > >  1 file changed, 36 insertions(+), 36 deletions(-)
> > > > >
> > > > > diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> > > > > index eb63daaca702..e8ddd691b788 100644
> > > > > --- a/drivers/staging/emxx_udc/emxx_udc.c
> > > > > +++ b/drivers/staging/emxx_udc/emxx_udc.c
> > > > > @@ -149,8 +149,8 @@ static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req)
> > > > >  			/* SET_FEATURE */
> > > > >  			recipient = (u8)(p_ctrl->bRequestType & USB_RECIP_MASK);
> > > > >  			selector  = le16_to_cpu(p_ctrl->wValue);
> > > > > -			if ((recipient == USB_RECIP_DEVICE) &&
> > > > > -			    (selector == USB_DEVICE_TEST_MODE)) {
> > > > > +			if (recipient == USB_RECIP_DEVICE &&
> > > > > +			    selector == USB_DEVICE_TEST_MODE) {
> > > > >  				wIndex = le16_to_cpu(p_ctrl->wIndex);
> > > > >  				test_mode = (u32)(wIndex >> 8);
> > > > >  				_nbu2ss_set_test_mode(udc, test_mode);
> > > > > @@ -287,7 +287,7 @@ static int _nbu2ss_epn_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > > > >  	u32		num;
> > > > >  	u32		data;
> > > > >
> > > > > -	if ((ep->epnum == 0) || (udc->vbus_active == 0))
> > > > > +	if (ep->epnum == 0 || udc->vbus_active == 0)
> > > > >  		return	-EINVAL;
> > > > >
> > > > >  	num = ep->epnum - 1;
> > > > > @@ -336,7 +336,7 @@ static void _nbu2ss_ep_dma_init(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > > > >  	u32		data;
> > > > >
> > > > >  	data = _nbu2ss_readl(&udc->p_regs->USBSSCONF);
> > > > > -	if (((ep->epnum == 0) || (data & (1 << ep->epnum)) == 0))
> > > > > +	if (ep->epnum == 0 || (data & (1 << ep->epnum)) == 0)
> > > > >  		return;		/* Not Support DMA */
> > > > >
> > > > >  	num = ep->epnum - 1;
> > > > > @@ -380,7 +380,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > > > >  		return;		/* VBUS OFF */
> > > > >
> > > > >  	data = _nbu2ss_readl(&preg->USBSSCONF);
> > > > > -	if ((ep->epnum == 0) || ((data & (1 << ep->epnum)) == 0))
> > > > > +	if (ep->epnum == 0 || (data & (1 << ep->epnum)) == 0)
> > > > >  		return;		/* Not Support DMA */
> > > > >
> > > > >  	num = ep->epnum - 1;
> > > > > @@ -560,7 +560,7 @@ static int ep0_out_overbytes(struct nbu2ss_udc *udc, u8 *p_buf, u32 length)
> > > > >  	union usb_reg_access  temp_32;
> > > > >  	union usb_reg_access  *p_buf_32 = (union usb_reg_access *)p_buf;
> > > > >
> > > > > -	if ((length > 0) && (length < sizeof(u32))) {
> > > > > +	if (length > 0 && length < sizeof(u32)) {
> > > > >  		temp_32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
> > > > >  		for (i = 0 ; i < length ; i++)
> > > > >  			p_buf_32->byte.DATA[i] = temp_32.byte.DATA[i];
> > > > > @@ -608,7 +608,7 @@ static int ep0_in_overbytes(struct nbu2ss_udc *udc,
> > > > >  	union usb_reg_access  temp_32;
> > > > >  	union usb_reg_access  *p_buf_32 = (union usb_reg_access *)p_buf;
> > > > >
> > > > > -	if ((i_remain_size > 0) && (i_remain_size < sizeof(u32))) {
> > > > > +	if (i_remain_size > 0 && i_remain_size < sizeof(u32)) {
> > > > >  		for (i = 0 ; i < i_remain_size ; i++)
> > > > >  			temp_32.byte.DATA[i] = p_buf_32->byte.DATA[i];
> > > > >  		_nbu2ss_ep_in_end(udc, 0, temp_32.dw, i_remain_size);
> > > > > @@ -701,7 +701,7 @@ static int _nbu2ss_ep0_in_transfer(struct nbu2ss_udc *udc,
> > > > >  		return result;
> > > > >  	}
> > > > >
> > > > > -	if ((i_remain_size < sizeof(u32)) && (result != EP0_PACKETSIZE)) {
> > > > > +	if (i_remain_size < sizeof(u32) && result != EP0_PACKETSIZE) {
> > > > >  		p_buffer += result;
> > > > >  		result += ep0_in_overbytes(udc, p_buffer, i_remain_size);
> > > > >  		req->div_len = result;
> > > > > @@ -738,7 +738,7 @@ static int _nbu2ss_ep0_out_transfer(struct nbu2ss_udc *udc,
> > > > >  		req->req.actual += result;
> > > > >  		i_recv_length -= result;
> > > > >
> > > > > -		if ((i_recv_length > 0) && (i_recv_length < sizeof(u32))) {
> > > > > +		if (i_recv_length > 0 && i_recv_length < sizeof(u32)) {
> > > > >  			p_buffer += result;
> > > > >  			i_remain_size -= result;
> > > > >
> > > > > @@ -891,8 +891,8 @@ static int _nbu2ss_epn_out_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > > > >
> > > > >  	req->req.actual += result;
> > > > >
> > > > > -	if ((req->req.actual == req->req.length) ||
> > > > > -	    ((req->req.actual % ep->ep.maxpacket) != 0)) {
> > > > > +	if (req->req.actual == req->req.length ||
> > > > > +	    (req->req.actual % ep->ep.maxpacket) != 0) {
> > > > >  		result = 0;
> > > > >  	}
> > > > >
> > > > > @@ -914,8 +914,8 @@ static int _nbu2ss_epn_out_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > > > >
> > > > >  	i_buf_size = min((req->req.length - req->req.actual), data_size);
> > > > >
> > > > > -	if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
> > > > > -	    (i_buf_size  >= sizeof(u32))) {
> > > > > +	if (ep->ep_type != USB_ENDPOINT_XFER_INT && req->req.dma != 0 &&
> > > > > +	    i_buf_size  >= sizeof(u32)) {
> > > > >  		nret = _nbu2ss_out_dma(udc, req, num, i_buf_size);
> > > > >  	} else {
> > > > >  		i_buf_size = min_t(u32, i_buf_size, ep->ep.maxpacket);
> > > > > @@ -954,8 +954,8 @@ static int _nbu2ss_epn_out_transfer(struct nbu2ss_udc *udc,
> > > > >  			}
> > > > >  		}
> > > > >  	} else {
> > > > > -		if ((req->req.actual == req->req.length) ||
> > > > > -		    ((req->req.actual % ep->ep.maxpacket) != 0)) {
> > > > > +		if (req->req.actual == req->req.length ||
> > > > > +		    (req->req.actual % ep->ep.maxpacket) != 0) {
> > > > >  			result = 0;
> > > > >  		}
> > > > >  	}
> > > > > @@ -1106,8 +1106,8 @@ static int _nbu2ss_epn_in_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > > > >
> > > > >  	num = ep->epnum - 1;
> > > > >
> > > > > -	if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
> > > > > -	    (data_size >= sizeof(u32))) {
> > > > > +	if (ep->ep_type != USB_ENDPOINT_XFER_INT && req->req.dma != 0 &&
> > > > > +	    data_size >= sizeof(u32)) {
> > > > >  		nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);
> > > > >  	} else {
> > > > >  		data_size = min_t(u32, data_size, ep->ep.maxpacket);
> > > > > @@ -1238,7 +1238,7 @@ static void _nbu2ss_endpoint_toggle_reset(struct nbu2ss_udc *udc, u8 ep_adrs)
> > > > >  	u8		num;
> > > > >  	u32		data;
> > > > >
> > > > > -	if ((ep_adrs == 0) || (ep_adrs == 0x80))
> > > > > +	if (ep_adrs == 0 || ep_adrs == 0x80)
> > > > >  		return;
> > > > >
> > > > >  	num = (ep_adrs & 0x7F) - 1;
> > > > > @@ -1261,7 +1261,7 @@ static void _nbu2ss_set_endpoint_stall(struct nbu2ss_udc *udc,
> > > > >  	struct nbu2ss_ep *ep;
> > > > >  	struct fc_regs __iomem *preg = udc->p_regs;
> > > > >
> > > > > -	if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
> > > > > +	if (ep_adrs == 0 || ep_adrs == 0x80) {
> > > > >  		if (bstall) {
> > > > >  			/* Set STALL */
> > > > >  			_nbu2ss_bitset(&preg->EP0_CONTROL, EP0_STL);
> > > > > @@ -1392,8 +1392,8 @@ static inline int _nbu2ss_req_feature(struct nbu2ss_udc *udc, bool bset)
> > > > >  	u8	ep_adrs;
> > > > >  	int	result = -EOPNOTSUPP;
> > > > >
> > > > > -	if ((udc->ctrl.wLength != 0x0000) ||
> > > > > -	    (direction != USB_DIR_OUT)) {
> > > > > +	if (udc->ctrl.wLength != 0x0000 ||
> > > > > +	    direction != USB_DIR_OUT) {
> > > > >  		return -EINVAL;
> > > > >  	}
> > > > >
> > > > > @@ -1480,7 +1480,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
> > > > >  	u8	ep_adrs;
> > > > >  	int	result = -EINVAL;
> > > > >
> > > > > -	if ((udc->ctrl.wValue != 0x0000) || (direction != USB_DIR_IN))
> > > > > +	if (udc->ctrl.wValue != 0x0000 || direction != USB_DIR_IN)
> > > > >  		return result;
> > > > >
> > > > >  	length =
> > > > > @@ -1542,9 +1542,9 @@ static int std_req_set_address(struct nbu2ss_udc *udc)
> > > > >  	int		result = 0;
> > > > >  	u32		wValue = le16_to_cpu(udc->ctrl.wValue);
> > > > >
> > > > > -	if ((udc->ctrl.bRequestType != 0x00)	||
> > > > > -	    (udc->ctrl.wIndex != 0x0000)	||
> > > > > -		(udc->ctrl.wLength != 0x0000)) {
> > > > > +	if (udc->ctrl.bRequestType != 0x00	||
> > > > > +	    udc->ctrl.wIndex != 0x0000		||
> > > > > +		udc->ctrl.wLength != 0x0000) {
> > > > >  		return -EINVAL;
> > > > >  	}
> > > > >
> > > > > @@ -1564,9 +1564,9 @@ static int std_req_set_configuration(struct nbu2ss_udc *udc)
> > > > >  {
> > > > >  	u32 config_value = (u32)(le16_to_cpu(udc->ctrl.wValue) & 0x00ff);
> > > > >
> > > > > -	if ((udc->ctrl.wIndex != 0x0000)	||
> > > > > -	    (udc->ctrl.wLength != 0x0000)	||
> > > > > -		(udc->ctrl.bRequestType != 0x00)) {
> > > > > +	if (udc->ctrl.wIndex != 0x0000	||
> > > > > +	    udc->ctrl.wLength != 0x0000	||
> > > > > +		udc->ctrl.bRequestType != 0x00) {
> > > > >  		return -EINVAL;
> > > > >  	}
> > > > >
> > > > > @@ -1838,8 +1838,8 @@ static void _nbu2ss_ep_done(struct nbu2ss_ep *ep,
> > > > >  	}
> > > > >
> > > > >  #ifdef USE_DMA
> > > > > -	if ((ep->direct == USB_DIR_OUT) && (ep->epnum > 0) &&
> > > > > -	    (req->req.dma != 0))
> > > > > +	if (ep->direct == USB_DIR_OUT && ep->epnum > 0 &&
> > > > > +	    req->req.dma != 0)
> > > > >  		_nbu2ss_dma_unmap_single(udc, ep, req, USB_DIR_OUT);
> > > > >  #endif
> > > > >
> > > > > @@ -1931,7 +1931,7 @@ static inline void _nbu2ss_epn_in_dma_int(struct nbu2ss_udc *udc,
> > > > >  		mpkt = ep->ep.maxpacket;
> > > > >  		size = preq->actual % mpkt;
> > > > >  		if (size > 0) {
> > > > > -			if (((preq->actual & 0x03) == 0) && (size < mpkt))
> > > > > +			if ((preq->actual & 0x03) == 0 && size < mpkt)
> > > > >  				_nbu2ss_ep_in_end(udc, ep->epnum, 0, 0);
> > > > >  		} else {
> > > > >  			_nbu2ss_epn_in_int(udc, ep, req);
> > > > > @@ -2428,8 +2428,8 @@ static int nbu2ss_ep_enable(struct usb_ep *_ep,
> > > > >  	}
> > > > >
> > > > >  	ep_type = usb_endpoint_type(desc);
> > > > > -	if ((ep_type == USB_ENDPOINT_XFER_CONTROL) ||
> > > > > -	    (ep_type == USB_ENDPOINT_XFER_ISOC)) {
> > > > > +	if (ep_type == USB_ENDPOINT_XFER_CONTROL ||
> > > > > +	    ep_type == USB_ENDPOINT_XFER_ISOC) {
> > > > >  		pr_err(" *** %s, bat bmAttributes\n", __func__);
> > > > >  		return -EINVAL;
> > > > >  	}
> > > > > @@ -2438,7 +2438,7 @@ static int nbu2ss_ep_enable(struct usb_ep *_ep,
> > > > >  	if (udc->vbus_active == 0)
> > > > >  		return -ESHUTDOWN;
> > > > >
> > > > > -	if ((!udc->driver) || (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
> > > > > +	if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
> > > > >  		dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__);
> > > > >  		return -ESHUTDOWN;
> > > > >  	}
> > > > > @@ -2603,8 +2603,8 @@ static int nbu2ss_ep_queue(struct usb_ep *_ep,
> > > > >  		}
> > > > >  	}
> > > > >
> > > > > -	if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT) &&
> > > > > -	    (req->req.dma != 0))
> > > > > +	if (ep->epnum > 0 && ep->direct == USB_DIR_OUT &&
> > > > > +	    req->req.dma != 0)
> > > > >  		_nbu2ss_dma_map_single(udc, ep, req, USB_DIR_OUT);
> > > > >  #endif
> > > > >
> > > > > --
> > > > > 2.34.1
> > > > >
> > > > >
> > > > >
> > >
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-10-16 12:34 ` your mail Julia Lawall
@ 2023-10-16 12:42   ` Gilbert Adikankwu
  2023-10-16 13:23     ` Julia Lawall
  0 siblings, 1 reply; 11+ messages in thread
From: Gilbert Adikankwu @ 2023-10-16 12:42 UTC (permalink / raw)
  To: Julia Lawall, outreachy; +Cc: linux-staging, linux-kernel, gregkh

On Mon, Oct 16, 2023 at 02:34:48PM +0200, Julia Lawall wrote:
> 
> 
> On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
> 
> > linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
> > Bcc:
> > Subject: Re: [PATCH] staging: emxx_udc: Remove unnecessary parentheses around
> >  condition tests
> > Reply-To:
> > In-Reply-To: <6b60ed7-9d97-2071-44f8-83b173191ed@inria.fr>
> >
> > On Mon, Oct 16, 2023 at 02:15:06PM +0200, Julia Lawall wrote:
> > >
> > >
> > > On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
> > >
> > > > Fix 47 warnings detected by checkpatch.pl about unnecessary parenthesis
> > > > around condition tests.
> > >
> > > If you need to make any changes to the patch, there is no need to give the
> > > count of the changes.  It doesn't matter if it's 47, 46, 35, etc.
> > >
> > > julia
> > >
> > Hi Julia,
> >
> > I added the number because I saw I similar commit on the logs that did
> > so. (commit b83970f23f36f0e2968872140e69f68118d82fe3)
> 
> OK, I still think it's pointless...  The person who looks at the commit 5
> years from now won't care about this information.  They care about what
> you did and why.
> 
> julia
> 
Ok that make sense. I will revise it. Do I send revision patch now or
later today?
> 
> > > >
> > > > Signed-off-by: Gilbert Adikankwu <gilbertadikankwu@gmail.com>
> > > > ---
> > > >  drivers/staging/emxx_udc/emxx_udc.c | 72 ++++++++++++++---------------
> > > >  1 file changed, 36 insertions(+), 36 deletions(-)
> > > >
> > > > diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> > > > index eb63daaca702..e8ddd691b788 100644
> > > > --- a/drivers/staging/emxx_udc/emxx_udc.c
> > > > +++ b/drivers/staging/emxx_udc/emxx_udc.c
> > > > @@ -149,8 +149,8 @@ static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req)
> > > >  			/* SET_FEATURE */
> > > >  			recipient = (u8)(p_ctrl->bRequestType & USB_RECIP_MASK);
> > > >  			selector  = le16_to_cpu(p_ctrl->wValue);
> > > > -			if ((recipient == USB_RECIP_DEVICE) &&
> > > > -			    (selector == USB_DEVICE_TEST_MODE)) {
> > > > +			if (recipient == USB_RECIP_DEVICE &&
> > > > +			    selector == USB_DEVICE_TEST_MODE) {
> > > >  				wIndex = le16_to_cpu(p_ctrl->wIndex);
> > > >  				test_mode = (u32)(wIndex >> 8);
> > > >  				_nbu2ss_set_test_mode(udc, test_mode);
> > > > @@ -287,7 +287,7 @@ static int _nbu2ss_epn_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > > >  	u32		num;
> > > >  	u32		data;
> > > >
> > > > -	if ((ep->epnum == 0) || (udc->vbus_active == 0))
> > > > +	if (ep->epnum == 0 || udc->vbus_active == 0)
> > > >  		return	-EINVAL;
> > > >
> > > >  	num = ep->epnum - 1;
> > > > @@ -336,7 +336,7 @@ static void _nbu2ss_ep_dma_init(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > > >  	u32		data;
> > > >
> > > >  	data = _nbu2ss_readl(&udc->p_regs->USBSSCONF);
> > > > -	if (((ep->epnum == 0) || (data & (1 << ep->epnum)) == 0))
> > > > +	if (ep->epnum == 0 || (data & (1 << ep->epnum)) == 0)
> > > >  		return;		/* Not Support DMA */
> > > >
> > > >  	num = ep->epnum - 1;
> > > > @@ -380,7 +380,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > > >  		return;		/* VBUS OFF */
> > > >
> > > >  	data = _nbu2ss_readl(&preg->USBSSCONF);
> > > > -	if ((ep->epnum == 0) || ((data & (1 << ep->epnum)) == 0))
> > > > +	if (ep->epnum == 0 || (data & (1 << ep->epnum)) == 0)
> > > >  		return;		/* Not Support DMA */
> > > >
> > > >  	num = ep->epnum - 1;
> > > > @@ -560,7 +560,7 @@ static int ep0_out_overbytes(struct nbu2ss_udc *udc, u8 *p_buf, u32 length)
> > > >  	union usb_reg_access  temp_32;
> > > >  	union usb_reg_access  *p_buf_32 = (union usb_reg_access *)p_buf;
> > > >
> > > > -	if ((length > 0) && (length < sizeof(u32))) {
> > > > +	if (length > 0 && length < sizeof(u32)) {
> > > >  		temp_32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
> > > >  		for (i = 0 ; i < length ; i++)
> > > >  			p_buf_32->byte.DATA[i] = temp_32.byte.DATA[i];
> > > > @@ -608,7 +608,7 @@ static int ep0_in_overbytes(struct nbu2ss_udc *udc,
> > > >  	union usb_reg_access  temp_32;
> > > >  	union usb_reg_access  *p_buf_32 = (union usb_reg_access *)p_buf;
> > > >
> > > > -	if ((i_remain_size > 0) && (i_remain_size < sizeof(u32))) {
> > > > +	if (i_remain_size > 0 && i_remain_size < sizeof(u32)) {
> > > >  		for (i = 0 ; i < i_remain_size ; i++)
> > > >  			temp_32.byte.DATA[i] = p_buf_32->byte.DATA[i];
> > > >  		_nbu2ss_ep_in_end(udc, 0, temp_32.dw, i_remain_size);
> > > > @@ -701,7 +701,7 @@ static int _nbu2ss_ep0_in_transfer(struct nbu2ss_udc *udc,
> > > >  		return result;
> > > >  	}
> > > >
> > > > -	if ((i_remain_size < sizeof(u32)) && (result != EP0_PACKETSIZE)) {
> > > > +	if (i_remain_size < sizeof(u32) && result != EP0_PACKETSIZE) {
> > > >  		p_buffer += result;
> > > >  		result += ep0_in_overbytes(udc, p_buffer, i_remain_size);
> > > >  		req->div_len = result;
> > > > @@ -738,7 +738,7 @@ static int _nbu2ss_ep0_out_transfer(struct nbu2ss_udc *udc,
> > > >  		req->req.actual += result;
> > > >  		i_recv_length -= result;
> > > >
> > > > -		if ((i_recv_length > 0) && (i_recv_length < sizeof(u32))) {
> > > > +		if (i_recv_length > 0 && i_recv_length < sizeof(u32)) {
> > > >  			p_buffer += result;
> > > >  			i_remain_size -= result;
> > > >
> > > > @@ -891,8 +891,8 @@ static int _nbu2ss_epn_out_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > > >
> > > >  	req->req.actual += result;
> > > >
> > > > -	if ((req->req.actual == req->req.length) ||
> > > > -	    ((req->req.actual % ep->ep.maxpacket) != 0)) {
> > > > +	if (req->req.actual == req->req.length ||
> > > > +	    (req->req.actual % ep->ep.maxpacket) != 0) {
> > > >  		result = 0;
> > > >  	}
> > > >
> > > > @@ -914,8 +914,8 @@ static int _nbu2ss_epn_out_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > > >
> > > >  	i_buf_size = min((req->req.length - req->req.actual), data_size);
> > > >
> > > > -	if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
> > > > -	    (i_buf_size  >= sizeof(u32))) {
> > > > +	if (ep->ep_type != USB_ENDPOINT_XFER_INT && req->req.dma != 0 &&
> > > > +	    i_buf_size  >= sizeof(u32)) {
> > > >  		nret = _nbu2ss_out_dma(udc, req, num, i_buf_size);
> > > >  	} else {
> > > >  		i_buf_size = min_t(u32, i_buf_size, ep->ep.maxpacket);
> > > > @@ -954,8 +954,8 @@ static int _nbu2ss_epn_out_transfer(struct nbu2ss_udc *udc,
> > > >  			}
> > > >  		}
> > > >  	} else {
> > > > -		if ((req->req.actual == req->req.length) ||
> > > > -		    ((req->req.actual % ep->ep.maxpacket) != 0)) {
> > > > +		if (req->req.actual == req->req.length ||
> > > > +		    (req->req.actual % ep->ep.maxpacket) != 0) {
> > > >  			result = 0;
> > > >  		}
> > > >  	}
> > > > @@ -1106,8 +1106,8 @@ static int _nbu2ss_epn_in_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > > >
> > > >  	num = ep->epnum - 1;
> > > >
> > > > -	if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
> > > > -	    (data_size >= sizeof(u32))) {
> > > > +	if (ep->ep_type != USB_ENDPOINT_XFER_INT && req->req.dma != 0 &&
> > > > +	    data_size >= sizeof(u32)) {
> > > >  		nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);
> > > >  	} else {
> > > >  		data_size = min_t(u32, data_size, ep->ep.maxpacket);
> > > > @@ -1238,7 +1238,7 @@ static void _nbu2ss_endpoint_toggle_reset(struct nbu2ss_udc *udc, u8 ep_adrs)
> > > >  	u8		num;
> > > >  	u32		data;
> > > >
> > > > -	if ((ep_adrs == 0) || (ep_adrs == 0x80))
> > > > +	if (ep_adrs == 0 || ep_adrs == 0x80)
> > > >  		return;
> > > >
> > > >  	num = (ep_adrs & 0x7F) - 1;
> > > > @@ -1261,7 +1261,7 @@ static void _nbu2ss_set_endpoint_stall(struct nbu2ss_udc *udc,
> > > >  	struct nbu2ss_ep *ep;
> > > >  	struct fc_regs __iomem *preg = udc->p_regs;
> > > >
> > > > -	if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
> > > > +	if (ep_adrs == 0 || ep_adrs == 0x80) {
> > > >  		if (bstall) {
> > > >  			/* Set STALL */
> > > >  			_nbu2ss_bitset(&preg->EP0_CONTROL, EP0_STL);
> > > > @@ -1392,8 +1392,8 @@ static inline int _nbu2ss_req_feature(struct nbu2ss_udc *udc, bool bset)
> > > >  	u8	ep_adrs;
> > > >  	int	result = -EOPNOTSUPP;
> > > >
> > > > -	if ((udc->ctrl.wLength != 0x0000) ||
> > > > -	    (direction != USB_DIR_OUT)) {
> > > > +	if (udc->ctrl.wLength != 0x0000 ||
> > > > +	    direction != USB_DIR_OUT) {
> > > >  		return -EINVAL;
> > > >  	}
> > > >
> > > > @@ -1480,7 +1480,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
> > > >  	u8	ep_adrs;
> > > >  	int	result = -EINVAL;
> > > >
> > > > -	if ((udc->ctrl.wValue != 0x0000) || (direction != USB_DIR_IN))
> > > > +	if (udc->ctrl.wValue != 0x0000 || direction != USB_DIR_IN)
> > > >  		return result;
> > > >
> > > >  	length =
> > > > @@ -1542,9 +1542,9 @@ static int std_req_set_address(struct nbu2ss_udc *udc)
> > > >  	int		result = 0;
> > > >  	u32		wValue = le16_to_cpu(udc->ctrl.wValue);
> > > >
> > > > -	if ((udc->ctrl.bRequestType != 0x00)	||
> > > > -	    (udc->ctrl.wIndex != 0x0000)	||
> > > > -		(udc->ctrl.wLength != 0x0000)) {
> > > > +	if (udc->ctrl.bRequestType != 0x00	||
> > > > +	    udc->ctrl.wIndex != 0x0000		||
> > > > +		udc->ctrl.wLength != 0x0000) {
> > > >  		return -EINVAL;
> > > >  	}
> > > >
> > > > @@ -1564,9 +1564,9 @@ static int std_req_set_configuration(struct nbu2ss_udc *udc)
> > > >  {
> > > >  	u32 config_value = (u32)(le16_to_cpu(udc->ctrl.wValue) & 0x00ff);
> > > >
> > > > -	if ((udc->ctrl.wIndex != 0x0000)	||
> > > > -	    (udc->ctrl.wLength != 0x0000)	||
> > > > -		(udc->ctrl.bRequestType != 0x00)) {
> > > > +	if (udc->ctrl.wIndex != 0x0000	||
> > > > +	    udc->ctrl.wLength != 0x0000	||
> > > > +		udc->ctrl.bRequestType != 0x00) {
> > > >  		return -EINVAL;
> > > >  	}
> > > >
> > > > @@ -1838,8 +1838,8 @@ static void _nbu2ss_ep_done(struct nbu2ss_ep *ep,
> > > >  	}
> > > >
> > > >  #ifdef USE_DMA
> > > > -	if ((ep->direct == USB_DIR_OUT) && (ep->epnum > 0) &&
> > > > -	    (req->req.dma != 0))
> > > > +	if (ep->direct == USB_DIR_OUT && ep->epnum > 0 &&
> > > > +	    req->req.dma != 0)
> > > >  		_nbu2ss_dma_unmap_single(udc, ep, req, USB_DIR_OUT);
> > > >  #endif
> > > >
> > > > @@ -1931,7 +1931,7 @@ static inline void _nbu2ss_epn_in_dma_int(struct nbu2ss_udc *udc,
> > > >  		mpkt = ep->ep.maxpacket;
> > > >  		size = preq->actual % mpkt;
> > > >  		if (size > 0) {
> > > > -			if (((preq->actual & 0x03) == 0) && (size < mpkt))
> > > > +			if ((preq->actual & 0x03) == 0 && size < mpkt)
> > > >  				_nbu2ss_ep_in_end(udc, ep->epnum, 0, 0);
> > > >  		} else {
> > > >  			_nbu2ss_epn_in_int(udc, ep, req);
> > > > @@ -2428,8 +2428,8 @@ static int nbu2ss_ep_enable(struct usb_ep *_ep,
> > > >  	}
> > > >
> > > >  	ep_type = usb_endpoint_type(desc);
> > > > -	if ((ep_type == USB_ENDPOINT_XFER_CONTROL) ||
> > > > -	    (ep_type == USB_ENDPOINT_XFER_ISOC)) {
> > > > +	if (ep_type == USB_ENDPOINT_XFER_CONTROL ||
> > > > +	    ep_type == USB_ENDPOINT_XFER_ISOC) {
> > > >  		pr_err(" *** %s, bat bmAttributes\n", __func__);
> > > >  		return -EINVAL;
> > > >  	}
> > > > @@ -2438,7 +2438,7 @@ static int nbu2ss_ep_enable(struct usb_ep *_ep,
> > > >  	if (udc->vbus_active == 0)
> > > >  		return -ESHUTDOWN;
> > > >
> > > > -	if ((!udc->driver) || (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
> > > > +	if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
> > > >  		dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__);
> > > >  		return -ESHUTDOWN;
> > > >  	}
> > > > @@ -2603,8 +2603,8 @@ static int nbu2ss_ep_queue(struct usb_ep *_ep,
> > > >  		}
> > > >  	}
> > > >
> > > > -	if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT) &&
> > > > -	    (req->req.dma != 0))
> > > > +	if (ep->epnum > 0 && ep->direct == USB_DIR_OUT &&
> > > > +	    req->req.dma != 0)
> > > >  		_nbu2ss_dma_map_single(udc, ep, req, USB_DIR_OUT);
> > > >  #endif
> > > >
> > > > --
> > > > 2.34.1
> > > >
> > > >
> > > >
> >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: your mail
  2023-10-16 12:31 Gilbert Adikankwu
@ 2023-10-16 12:34 ` Julia Lawall
  2023-10-16 12:42   ` Gilbert Adikankwu
  0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2023-10-16 12:34 UTC (permalink / raw)
  To: Gilbert Adikankwu; +Cc: outreachy, gregkh, linux-staging, linux-kernel



On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:

> linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
> Bcc:
> Subject: Re: [PATCH] staging: emxx_udc: Remove unnecessary parentheses around
>  condition tests
> Reply-To:
> In-Reply-To: <6b60ed7-9d97-2071-44f8-83b173191ed@inria.fr>
>
> On Mon, Oct 16, 2023 at 02:15:06PM +0200, Julia Lawall wrote:
> >
> >
> > On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
> >
> > > Fix 47 warnings detected by checkpatch.pl about unnecessary parenthesis
> > > around condition tests.
> >
> > If you need to make any changes to the patch, there is no need to give the
> > count of the changes.  It doesn't matter if it's 47, 46, 35, etc.
> >
> > julia
> >
> Hi Julia,
>
> I added the number because I saw I similar commit on the logs that did
> so. (commit b83970f23f36f0e2968872140e69f68118d82fe3)

OK, I still think it's pointless...  The person who looks at the commit 5
years from now won't care about this information.  They care about what
you did and why.

julia


> > >
> > > Signed-off-by: Gilbert Adikankwu <gilbertadikankwu@gmail.com>
> > > ---
> > >  drivers/staging/emxx_udc/emxx_udc.c | 72 ++++++++++++++---------------
> > >  1 file changed, 36 insertions(+), 36 deletions(-)
> > >
> > > diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> > > index eb63daaca702..e8ddd691b788 100644
> > > --- a/drivers/staging/emxx_udc/emxx_udc.c
> > > +++ b/drivers/staging/emxx_udc/emxx_udc.c
> > > @@ -149,8 +149,8 @@ static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req)
> > >  			/* SET_FEATURE */
> > >  			recipient = (u8)(p_ctrl->bRequestType & USB_RECIP_MASK);
> > >  			selector  = le16_to_cpu(p_ctrl->wValue);
> > > -			if ((recipient == USB_RECIP_DEVICE) &&
> > > -			    (selector == USB_DEVICE_TEST_MODE)) {
> > > +			if (recipient == USB_RECIP_DEVICE &&
> > > +			    selector == USB_DEVICE_TEST_MODE) {
> > >  				wIndex = le16_to_cpu(p_ctrl->wIndex);
> > >  				test_mode = (u32)(wIndex >> 8);
> > >  				_nbu2ss_set_test_mode(udc, test_mode);
> > > @@ -287,7 +287,7 @@ static int _nbu2ss_epn_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > >  	u32		num;
> > >  	u32		data;
> > >
> > > -	if ((ep->epnum == 0) || (udc->vbus_active == 0))
> > > +	if (ep->epnum == 0 || udc->vbus_active == 0)
> > >  		return	-EINVAL;
> > >
> > >  	num = ep->epnum - 1;
> > > @@ -336,7 +336,7 @@ static void _nbu2ss_ep_dma_init(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > >  	u32		data;
> > >
> > >  	data = _nbu2ss_readl(&udc->p_regs->USBSSCONF);
> > > -	if (((ep->epnum == 0) || (data & (1 << ep->epnum)) == 0))
> > > +	if (ep->epnum == 0 || (data & (1 << ep->epnum)) == 0)
> > >  		return;		/* Not Support DMA */
> > >
> > >  	num = ep->epnum - 1;
> > > @@ -380,7 +380,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> > >  		return;		/* VBUS OFF */
> > >
> > >  	data = _nbu2ss_readl(&preg->USBSSCONF);
> > > -	if ((ep->epnum == 0) || ((data & (1 << ep->epnum)) == 0))
> > > +	if (ep->epnum == 0 || (data & (1 << ep->epnum)) == 0)
> > >  		return;		/* Not Support DMA */
> > >
> > >  	num = ep->epnum - 1;
> > > @@ -560,7 +560,7 @@ static int ep0_out_overbytes(struct nbu2ss_udc *udc, u8 *p_buf, u32 length)
> > >  	union usb_reg_access  temp_32;
> > >  	union usb_reg_access  *p_buf_32 = (union usb_reg_access *)p_buf;
> > >
> > > -	if ((length > 0) && (length < sizeof(u32))) {
> > > +	if (length > 0 && length < sizeof(u32)) {
> > >  		temp_32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
> > >  		for (i = 0 ; i < length ; i++)
> > >  			p_buf_32->byte.DATA[i] = temp_32.byte.DATA[i];
> > > @@ -608,7 +608,7 @@ static int ep0_in_overbytes(struct nbu2ss_udc *udc,
> > >  	union usb_reg_access  temp_32;
> > >  	union usb_reg_access  *p_buf_32 = (union usb_reg_access *)p_buf;
> > >
> > > -	if ((i_remain_size > 0) && (i_remain_size < sizeof(u32))) {
> > > +	if (i_remain_size > 0 && i_remain_size < sizeof(u32)) {
> > >  		for (i = 0 ; i < i_remain_size ; i++)
> > >  			temp_32.byte.DATA[i] = p_buf_32->byte.DATA[i];
> > >  		_nbu2ss_ep_in_end(udc, 0, temp_32.dw, i_remain_size);
> > > @@ -701,7 +701,7 @@ static int _nbu2ss_ep0_in_transfer(struct nbu2ss_udc *udc,
> > >  		return result;
> > >  	}
> > >
> > > -	if ((i_remain_size < sizeof(u32)) && (result != EP0_PACKETSIZE)) {
> > > +	if (i_remain_size < sizeof(u32) && result != EP0_PACKETSIZE) {
> > >  		p_buffer += result;
> > >  		result += ep0_in_overbytes(udc, p_buffer, i_remain_size);
> > >  		req->div_len = result;
> > > @@ -738,7 +738,7 @@ static int _nbu2ss_ep0_out_transfer(struct nbu2ss_udc *udc,
> > >  		req->req.actual += result;
> > >  		i_recv_length -= result;
> > >
> > > -		if ((i_recv_length > 0) && (i_recv_length < sizeof(u32))) {
> > > +		if (i_recv_length > 0 && i_recv_length < sizeof(u32)) {
> > >  			p_buffer += result;
> > >  			i_remain_size -= result;
> > >
> > > @@ -891,8 +891,8 @@ static int _nbu2ss_epn_out_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > >
> > >  	req->req.actual += result;
> > >
> > > -	if ((req->req.actual == req->req.length) ||
> > > -	    ((req->req.actual % ep->ep.maxpacket) != 0)) {
> > > +	if (req->req.actual == req->req.length ||
> > > +	    (req->req.actual % ep->ep.maxpacket) != 0) {
> > >  		result = 0;
> > >  	}
> > >
> > > @@ -914,8 +914,8 @@ static int _nbu2ss_epn_out_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > >
> > >  	i_buf_size = min((req->req.length - req->req.actual), data_size);
> > >
> > > -	if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
> > > -	    (i_buf_size  >= sizeof(u32))) {
> > > +	if (ep->ep_type != USB_ENDPOINT_XFER_INT && req->req.dma != 0 &&
> > > +	    i_buf_size  >= sizeof(u32)) {
> > >  		nret = _nbu2ss_out_dma(udc, req, num, i_buf_size);
> > >  	} else {
> > >  		i_buf_size = min_t(u32, i_buf_size, ep->ep.maxpacket);
> > > @@ -954,8 +954,8 @@ static int _nbu2ss_epn_out_transfer(struct nbu2ss_udc *udc,
> > >  			}
> > >  		}
> > >  	} else {
> > > -		if ((req->req.actual == req->req.length) ||
> > > -		    ((req->req.actual % ep->ep.maxpacket) != 0)) {
> > > +		if (req->req.actual == req->req.length ||
> > > +		    (req->req.actual % ep->ep.maxpacket) != 0) {
> > >  			result = 0;
> > >  		}
> > >  	}
> > > @@ -1106,8 +1106,8 @@ static int _nbu2ss_epn_in_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
> > >
> > >  	num = ep->epnum - 1;
> > >
> > > -	if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
> > > -	    (data_size >= sizeof(u32))) {
> > > +	if (ep->ep_type != USB_ENDPOINT_XFER_INT && req->req.dma != 0 &&
> > > +	    data_size >= sizeof(u32)) {
> > >  		nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);
> > >  	} else {
> > >  		data_size = min_t(u32, data_size, ep->ep.maxpacket);
> > > @@ -1238,7 +1238,7 @@ static void _nbu2ss_endpoint_toggle_reset(struct nbu2ss_udc *udc, u8 ep_adrs)
> > >  	u8		num;
> > >  	u32		data;
> > >
> > > -	if ((ep_adrs == 0) || (ep_adrs == 0x80))
> > > +	if (ep_adrs == 0 || ep_adrs == 0x80)
> > >  		return;
> > >
> > >  	num = (ep_adrs & 0x7F) - 1;
> > > @@ -1261,7 +1261,7 @@ static void _nbu2ss_set_endpoint_stall(struct nbu2ss_udc *udc,
> > >  	struct nbu2ss_ep *ep;
> > >  	struct fc_regs __iomem *preg = udc->p_regs;
> > >
> > > -	if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
> > > +	if (ep_adrs == 0 || ep_adrs == 0x80) {
> > >  		if (bstall) {
> > >  			/* Set STALL */
> > >  			_nbu2ss_bitset(&preg->EP0_CONTROL, EP0_STL);
> > > @@ -1392,8 +1392,8 @@ static inline int _nbu2ss_req_feature(struct nbu2ss_udc *udc, bool bset)
> > >  	u8	ep_adrs;
> > >  	int	result = -EOPNOTSUPP;
> > >
> > > -	if ((udc->ctrl.wLength != 0x0000) ||
> > > -	    (direction != USB_DIR_OUT)) {
> > > +	if (udc->ctrl.wLength != 0x0000 ||
> > > +	    direction != USB_DIR_OUT) {
> > >  		return -EINVAL;
> > >  	}
> > >
> > > @@ -1480,7 +1480,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
> > >  	u8	ep_adrs;
> > >  	int	result = -EINVAL;
> > >
> > > -	if ((udc->ctrl.wValue != 0x0000) || (direction != USB_DIR_IN))
> > > +	if (udc->ctrl.wValue != 0x0000 || direction != USB_DIR_IN)
> > >  		return result;
> > >
> > >  	length =
> > > @@ -1542,9 +1542,9 @@ static int std_req_set_address(struct nbu2ss_udc *udc)
> > >  	int		result = 0;
> > >  	u32		wValue = le16_to_cpu(udc->ctrl.wValue);
> > >
> > > -	if ((udc->ctrl.bRequestType != 0x00)	||
> > > -	    (udc->ctrl.wIndex != 0x0000)	||
> > > -		(udc->ctrl.wLength != 0x0000)) {
> > > +	if (udc->ctrl.bRequestType != 0x00	||
> > > +	    udc->ctrl.wIndex != 0x0000		||
> > > +		udc->ctrl.wLength != 0x0000) {
> > >  		return -EINVAL;
> > >  	}
> > >
> > > @@ -1564,9 +1564,9 @@ static int std_req_set_configuration(struct nbu2ss_udc *udc)
> > >  {
> > >  	u32 config_value = (u32)(le16_to_cpu(udc->ctrl.wValue) & 0x00ff);
> > >
> > > -	if ((udc->ctrl.wIndex != 0x0000)	||
> > > -	    (udc->ctrl.wLength != 0x0000)	||
> > > -		(udc->ctrl.bRequestType != 0x00)) {
> > > +	if (udc->ctrl.wIndex != 0x0000	||
> > > +	    udc->ctrl.wLength != 0x0000	||
> > > +		udc->ctrl.bRequestType != 0x00) {
> > >  		return -EINVAL;
> > >  	}
> > >
> > > @@ -1838,8 +1838,8 @@ static void _nbu2ss_ep_done(struct nbu2ss_ep *ep,
> > >  	}
> > >
> > >  #ifdef USE_DMA
> > > -	if ((ep->direct == USB_DIR_OUT) && (ep->epnum > 0) &&
> > > -	    (req->req.dma != 0))
> > > +	if (ep->direct == USB_DIR_OUT && ep->epnum > 0 &&
> > > +	    req->req.dma != 0)
> > >  		_nbu2ss_dma_unmap_single(udc, ep, req, USB_DIR_OUT);
> > >  #endif
> > >
> > > @@ -1931,7 +1931,7 @@ static inline void _nbu2ss_epn_in_dma_int(struct nbu2ss_udc *udc,
> > >  		mpkt = ep->ep.maxpacket;
> > >  		size = preq->actual % mpkt;
> > >  		if (size > 0) {
> > > -			if (((preq->actual & 0x03) == 0) && (size < mpkt))
> > > +			if ((preq->actual & 0x03) == 0 && size < mpkt)
> > >  				_nbu2ss_ep_in_end(udc, ep->epnum, 0, 0);
> > >  		} else {
> > >  			_nbu2ss_epn_in_int(udc, ep, req);
> > > @@ -2428,8 +2428,8 @@ static int nbu2ss_ep_enable(struct usb_ep *_ep,
> > >  	}
> > >
> > >  	ep_type = usb_endpoint_type(desc);
> > > -	if ((ep_type == USB_ENDPOINT_XFER_CONTROL) ||
> > > -	    (ep_type == USB_ENDPOINT_XFER_ISOC)) {
> > > +	if (ep_type == USB_ENDPOINT_XFER_CONTROL ||
> > > +	    ep_type == USB_ENDPOINT_XFER_ISOC) {
> > >  		pr_err(" *** %s, bat bmAttributes\n", __func__);
> > >  		return -EINVAL;
> > >  	}
> > > @@ -2438,7 +2438,7 @@ static int nbu2ss_ep_enable(struct usb_ep *_ep,
> > >  	if (udc->vbus_active == 0)
> > >  		return -ESHUTDOWN;
> > >
> > > -	if ((!udc->driver) || (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
> > > +	if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
> > >  		dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__);
> > >  		return -ESHUTDOWN;
> > >  	}
> > > @@ -2603,8 +2603,8 @@ static int nbu2ss_ep_queue(struct usb_ep *_ep,
> > >  		}
> > >  	}
> > >
> > > -	if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT) &&
> > > -	    (req->req.dma != 0))
> > > +	if (ep->epnum > 0 && ep->direct == USB_DIR_OUT &&
> > > +	    req->req.dma != 0)
> > >  		_nbu2ss_dma_map_single(udc, ep, req, USB_DIR_OUT);
> > >  #endif
> > >
> > > --
> > > 2.34.1
> > >
> > >
> > >
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-10-16 13:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 16:36 Sumitra Sharma
2023-03-17 16:47 ` your mail Julia Lawall
2023-03-17 18:17   ` Sumitra Sharma
2023-03-19  8:09   ` Sumitra Sharma
2023-03-19  8:35     ` Julia Lawall
2023-03-19  8:56       ` Sumitra Sharma
2023-03-19  9:02         ` Julia Lawall
2023-03-19  9:53           ` Sumitra Sharma
2023-10-16 12:31 Gilbert Adikankwu
2023-10-16 12:34 ` your mail Julia Lawall
2023-10-16 12:42   ` Gilbert Adikankwu
2023-10-16 13:23     ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).