public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-arm-kernel@lists.arm.linux.org.uk, linux-omap@vger.kernel.org
Subject: Re: [PATCH 04/16] ARM: OMAP: Fix sparse, checkpatch warnings in OMAP2/3 PRCM/PM code
Date: Tue, 19 Aug 2008 18:21:38 +0100	[thread overview]
Message-ID: <20080819172138.GC17034@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1212804762-18413-3-git-send-email-tony@atomide.com>

On Fri, Jun 06, 2008 at 07:12:30PM -0700, Tony Lindgren wrote:
>  static void omap2_clk_wait_ready(struct clk *clk)
>  {
> -	void __iomem *reg, *other_reg, *st_reg;
> -	u32 bit;
> -
> -	/*
> -	 * REVISIT: This code is pretty ugly.  It would be nice to generalize
> -	 * it and pull it into struct clk itself somehow.
> -	 */
> -	reg = clk->enable_reg;
> -	if ((((u32)reg & 0xff) >= CM_FCLKEN1) &&
> -	    (((u32)reg & 0xff) <= OMAP24XX_CM_FCLKEN2))
> -		other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x10); /* CM_ICLKEN* */
> -	else if ((((u32)reg & 0xff) >= CM_ICLKEN1) &&
> -		 (((u32)reg & 0xff) <= OMAP24XX_CM_ICLKEN4))
> -		other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x00); /* CM_FCLKEN* */
> +	u32 bit, reg, other_reg, st_reg;
> +
> +	reg = (__force u32)clk->enable_reg;
> +	if (((reg & 0xff) >= CM_FCLKEN1) &&
> +	    ((reg & 0xff) <= OMAP24XX_CM_FCLKEN2))
> +		other_reg = ((reg & ~0xf0) | 0x10); /* CM_ICLKEN* */
> +	else if (((reg & 0xff) >= CM_ICLKEN1) &&
> +		 ((reg & 0xff) <= OMAP24XX_CM_ICLKEN4))
> +		other_reg = ((reg & ~0xf0) | 0x00); /* CM_FCLKEN* */

	unsigned long reg = (unsigned long)clk->enable_reg;

IIRC is a permitted cast, doesn't require __force.  And you can convert
back to void __iomem * without using __force either.

> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index aad781d..598f2d2 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -24,9 +24,9 @@
>  #include <linux/module.h>
>  #include <linux/delay.h>
>  #include <linux/clk.h>
> +#include <linux/io.h>
> +#include <linux/irq.h>
>  
> -#include <asm/io.h>
> -#include <asm/irq.h>

As I keep saying to people, not every warning that checkpatch spits
out is valid.  asm/irq.h -> linux/irq.h is not a valid warning.

  parent reply	other threads:[~2008-08-19 17:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07  2:12 [PATCH 02/16] ARM: OMAP2: Split sleep.S into sleep242x.S and sleep243x.S Tony Lindgren
2008-06-07  2:12 ` [PATCH 03/16] ARM: OMAP2: Add non-CORE DPLL rate set code and M,N programming Tony Lindgren
2008-06-07  2:12   ` [PATCH 04/16] ARM: OMAP: Fix sparse, checkpatch warnings in OMAP2/3 PRCM/PM code Tony Lindgren
2008-06-07  2:12     ` [PATCH 05/16] ARM: OMAP2: Move sys_clkout2 clk to core_clkdm Tony Lindgren
2008-06-07  2:12       ` [PATCH 06/16] ARM: OMAP2: Add missing SSI L4 interface clock Tony Lindgren
2008-06-07  2:12         ` [PATCH 07/16] ARM: OMAP2: Add clkdm_get_pwrdm() Tony Lindgren
2008-06-07  2:12           ` [PATCH 08/16] ARM: OMAP2: Remove OMAP_PRM_REGADDR Tony Lindgren
2008-06-07  2:12             ` [PATCH 09/16] ARM: OMAP2: Remove OMAP_CM_REGADDR Tony Lindgren
2008-06-07  2:12               ` [PATCH 10/16] ARM: OMAP2: Use omap_globals for CPU detection for multi-omap Tony Lindgren
2008-06-07  2:12                 ` [PATCH 11/16] ARM: OMAP2: Implement CPUfreq frequency table based on PRCM table Tony Lindgren
2008-06-07  2:12                   ` [PATCH 12/16] ARM: OMAP2: Add pinmux support for omap34xx Tony Lindgren
2008-06-07  2:12                     ` [PATCH 13/16] ARM: OMAP2: Fix sparse, checkpatch warnings fro GPMC code Tony Lindgren
2008-06-07  2:12                       ` [PATCH 14/16] ARM: OMAP2: Misc updates from linux-omap tree Tony Lindgren
2008-06-07  2:12                         ` [PATCH 15/16] ARM: OMAP2: Add minimal omap3430 support Tony Lindgren
2008-06-07  2:12                           ` [PATCH 16/16] ARM: OMAP2: Fix sparse, checkpatch warnings in OMAP2/3 IRQ code Tony Lindgren
2008-06-17  9:43                           ` [PATCH 15/16] ARM: OMAP2: Add minimal omap3430 support Tony Lindgren
2008-08-19 21:08                         ` [PATCH 14/16] ARM: OMAP2: Misc updates from linux-omap tree Russell King - ARM Linux
2008-08-20  7:42                           ` Tony Lindgren
2008-08-20  7:46                             ` Russell King - ARM Linux
2008-08-20  8:50                               ` Tony Lindgren
2008-08-23 22:43                             ` Tony Lindgren
2008-08-19 17:29           ` [PATCH 07/16] ARM: OMAP2: Add clkdm_get_pwrdm() Russell King - ARM Linux
2008-08-20  7:37             ` Tony Lindgren
2008-08-23 22:38               ` Tony Lindgren
2008-08-19 17:21     ` Russell King - ARM Linux [this message]
2008-08-23 22:36       ` [PATCH 04/16] ARM: OMAP: Fix sparse, checkpatch warnings in OMAP2/3 PRCM/PM code Tony Lindgren
2008-08-19 17:03 ` [PATCH 02/16] ARM: OMAP2: Split sleep.S into sleep242x.S and sleep243x.S Russell King - ARM Linux
2008-08-20  7:36   ` Tony Lindgren
2008-08-23 22:15     ` Tony Lindgren
2008-08-23 22:23       ` Tony Lindgren

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=20080819172138.GC17034@flint.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox