From: Greg KH <gregkh@linuxfoundation.org>
To: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v5 1/6] Staging: emxx_udc: Fix do not add new typedefs
Date: Thu, 26 Feb 2015 15:20:55 -0800 [thread overview]
Message-ID: <20150226232055.GA16476@kroah.com> (raw)
In-Reply-To: <114675998581f4b01d0d6c1556193010f35da12e.1424786861.git.hamohammed.sa@gmail.com>
On Tue, Feb 24, 2015 at 05:23:30PM +0300, Haneen Mohammed wrote:
> This patch fixes the following checkpatch.pl warning:"do not add new
> typedefs".
> Remove typedefs keyword and rename identifiers appropriately.
> Update related files.
>
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> ---
> v5: Nothing
> v4: Replace struct with volatile union for usb_reg_access.
> v3: Remove all typedefs and create patchset from emxx_udc.
> v2: Remove typedefs appropriately and change related file.
>
> drivers/staging/emxx_udc/emxx_udc.c | 60 ++++++++++++++++++-------------------
> drivers/staging/emxx_udc/emxx_udc.h | 26 ++++++++--------
> 2 files changed, 43 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index 82c492f..e33ccc4 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -201,7 +201,7 @@ static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc)
> u32 num, buf_type;
> u32 data, last_ram_adr, use_ram_size;
>
> - PT_EP_REGS p_ep_regs;
> + struct ep_regs *p_ep_regs;
>
> last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2;
> use_ram_size = 0;
> @@ -394,7 +394,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> {
> u32 num;
> u32 data;
> - PT_FC_REGS preg = udc->p_regs;
> + struct fc_regs *preg = udc->p_regs;
>
> if (udc->vbus_active == 0)
> return; /* VBUS OFF */
> @@ -425,7 +425,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> /* Abort DMA */
> static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
> {
> - PT_FC_REGS preg = udc->p_regs;
> + struct fc_regs *preg = udc->p_regs;
>
> _nbu2ss_bitclr(&preg->EP_DCR[ep->epnum-1].EP_DCR1, DCR1_EPn_REQEN);
> mdelay(DMA_DISABLE_TIME); /* DCR1_EPn_REQEN Clear */
> @@ -443,7 +443,7 @@ static void _nbu2ss_ep_in_end(
> {
> u32 data;
> u32 num;
> - PT_FC_REGS preg = udc->p_regs;
> + struct fc_regs *preg = udc->p_regs;
>
> if (length >= sizeof(u32))
> return;
> @@ -567,7 +567,7 @@ static int EP0_out_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
> u32 i;
> int nret = 0;
> u32 iWordLength = 0;
> - USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
> + volatile union usb_reg_access *pBuf32 = (volatile union usb_reg_access *)pBuf;
>
> /*------------------------------------------------------------*/
> /* Read Length */
> @@ -592,8 +592,8 @@ static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
> {
> u32 i;
> u32 iReadSize = 0;
> - USB_REG_ACCESS Temp32;
> - USB_REG_ACCESS *pBuf32 = (USB_REG_ACCESS *)pBuf;
> + volatile union usb_reg_access Temp32;
> + volatile union usb_reg_access *pBuf32 = (volatile union usb_reg_access *)pBuf;
volatile is almost never needed in the kernel, and in these places it's
wrong, so please don't add it here, or in any of these cases.
thanks,
greg k-h
next prev parent reply other threads:[~2015-02-26 23:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 14:18 [PATCH v5 0/6] Staging: emxx_udc: Fix checkpatch.pl warnings Haneen Mohammed
2015-02-24 14:23 ` [PATCH v5 1/6] Staging: emxx_udc: Fix do not add new typedefs Haneen Mohammed
2015-02-26 23:20 ` Greg KH [this message]
2015-02-24 14:31 ` [PATCH v5 2/6] Staging: emxx_udc: Remove volatile from union usb_regs_access Haneen Mohammed
2015-02-26 23:21 ` [Outreachy kernel] " Greg KH
2015-02-24 14:33 ` [PATCH v5 3/6] Staging: emxx_udc: Replace custom printk macro ERR with pr_err Haneen Mohammed
[not found] ` <20150226232212.GB21368@kroah.com>
2015-02-27 0:27 ` [Outreachy kernel] " Haneen Mohammed
2015-02-27 0:51 ` Greg KH
2015-02-24 14:36 ` [PATCH v5 4/6] Staging: emxx_udc: Replace custom printk macro ERR with dev_err Haneen Mohammed
2015-02-26 23:23 ` [Outreachy kernel] " Greg KH
2015-02-24 14:39 ` [PATCH v5 5/6] Staging: emxx_udc: Remove custom printk macro ERR Haneen Mohammed
2015-02-24 14:41 ` [PATCH v5 6/6] Staging: emxx_udc: Clean dev_err() logging Haneen Mohammed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150226232055.GA16476@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=hamohammed.sa@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.