Re: [PATCH] Input - elantech: force a resolution of 31 u/mm

2015-07-09 Thread Hans de Goede

Hi,

On 10-07-15 02:32, Peter Hutterer wrote:

All Elantech touchpads pre-v4 with dynamic resolution queries have a fixed
resolution of 800dpi -> 31.49 units/mm. Set this statically, so userspace does
not have to guess.

Cc: Duson Lin 
Signed-off-by: Peter Hutterer 


Ah I was planning on writing the same patch today, looks like you've
beat me to it :)

Patch looks good:

Reviewed-by: Hans de Goede 

Regards,

Hans



---
  drivers/input/mouse/elantech.c | 13 -
  1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index ce3d400..22b9ca9 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1167,7 +1167,7 @@ static int elantech_set_input_params(struct psmouse 
*psmouse)
struct input_dev *dev = psmouse->dev;
struct elantech_data *etd = psmouse->private;
unsigned int x_min = 0, y_min = 0, x_max = 0, y_max = 0, width = 0;
-   unsigned int x_res = 0, y_res = 0;
+   unsigned int x_res = 31, y_res = 31;

if (elantech_set_range(psmouse, &x_min, &y_min, &x_max, &y_max, &width))
return -1;
@@ -1232,8 +1232,6 @@ static int elantech_set_input_params(struct psmouse 
*psmouse)
/* For X to recognize me as touchpad. */
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
-   input_abs_set_res(dev, ABS_X, x_res);
-   input_abs_set_res(dev, ABS_Y, y_res);
/*
 * range of pressure and width is the same as v2,
 * report ABS_PRESSURE, ABS_TOOL_WIDTH for compatibility.
@@ -1246,8 +1244,6 @@ static int elantech_set_input_params(struct psmouse 
*psmouse)
input_mt_init_slots(dev, ETP_MAX_FINGERS, 0);
input_set_abs_params(dev, ABS_MT_POSITION_X, x_min, x_max, 0, 
0);
input_set_abs_params(dev, ABS_MT_POSITION_Y, y_min, y_max, 0, 
0);
-   input_abs_set_res(dev, ABS_MT_POSITION_X, x_res);
-   input_abs_set_res(dev, ABS_MT_POSITION_Y, y_res);
input_set_abs_params(dev, ABS_MT_PRESSURE, ETP_PMIN_V2,
 ETP_PMAX_V2, 0, 0);
/*
@@ -1259,6 +1255,13 @@ static int elantech_set_input_params(struct psmouse 
*psmouse)
break;
}

+   input_abs_set_res(dev, ABS_X, x_res);
+   input_abs_set_res(dev, ABS_Y, y_res);
+   if (etd->hw_version > 1) {
+   input_abs_set_res(dev, ABS_MT_POSITION_X, x_res);
+   input_abs_set_res(dev, ABS_MT_POSITION_Y, y_res);
+   }
+
etd->y_max = y_max;
etd->width = width;



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging: sm750fb: ddk750_dvi.h: Fix brace coding style issue

2015-07-09 Thread Anders Fridlund
Sorry, for that. Do I need to re-submit the patch(es), or should I
only change it for future patches?

Cheers,
Anders Fridlund

On Fri, Jul 10, 2015 at 7:33 AM, Sudip Mukherjee
 wrote:
> On Thu, Jul 09, 2015 at 02:45:22PM +0200, anders.fridl...@gmail.com wrote:
>> From: Anders Fridlund 
> same comment that I gave to your another patch.
> "No need to mention this From: here. Please fix your .gitconfig so that
> git send-email will put your name in the email From: header."
>
> regards
> sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] mfd: qcom-rpm: Add apq8064 QDSS clock resource

2015-07-09 Thread Lee Jones
On Wed, 08 Jul 2015, Ivan T. Ivanov wrote:

> Qualcomm Debug Subsystem clock is used by CoreSight components.
> Add required definitions for it. qcom_rpm_resource::status_id is
> not used by driver, so just mark it as ~0.
> 
> Signed-off-by: Ivan T. Ivanov 
> ---
> 
> Changes since first version:
> 
> * Use ~0 initializer for status_id, this field is not used by driver.
> 
>  drivers/mfd/qcom_rpm.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

> diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c
> index 12e3243..6afc9fa 100644
> --- a/drivers/mfd/qcom_rpm.c
> +++ b/drivers/mfd/qcom_rpm.c
> @@ -149,6 +149,7 @@ static const struct qcom_rpm_resource 
> apq8064_rpm_resource_table[] = {
>   [QCOM_RPM_USB_OTG_SWITCH] = { 210, 125, 82, 1 },
>   [QCOM_RPM_HDMI_SWITCH] ={ 211, 126, 83, 1 },
>   [QCOM_RPM_DDR_DMM] ={ 212, 127, 84, 2 },
> + [QCOM_RPM_QDSS_CLK] =   { 214, ~0, 7, 1 },
>   [QCOM_RPM_VDDMIN_GPIO] ={ 215, 131, 89, 1 },
>  };
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] power: reset: at91: add sama5d3 reset function

2015-07-09 Thread Maxime Ripard
On Fri, Jul 10, 2015 at 11:06:52AM +0800, Josh Wu wrote:
> Hi, Maxime
> 
> On 7/9/2015 8:03 PM, Maxime Ripard wrote:
> >Hi,
> >
> >On Thu, Jul 09, 2015 at 06:15:46PM +0800, Josh Wu wrote:
> >>As since sama5d3, to reset the chip, we don't need to shutdown the ddr
> >>controller.
> >>
> >>So add a new compatible string and new restart function for sama5d3 and
> >>later chips. As we don't use sama5d3 ddr controller, so remove it as
> >>well.
> >>
> >>Signed-off-by: Josh Wu 
> >>Acked-by: Nicolas Ferre 
> >>---
> >>
> >>  drivers/power/reset/at91-reset.c | 30 +-
> >>  1 file changed, 21 insertions(+), 9 deletions(-)
> >>
> >>diff --git a/drivers/power/reset/at91-reset.c 
> >>b/drivers/power/reset/at91-reset.c
> >>index 36dc52f..8944b63 100644
> >>--- a/drivers/power/reset/at91-reset.c
> >>+++ b/drivers/power/reset/at91-reset.c
> >>@@ -123,6 +123,14 @@ static int at91sam9g45_restart(struct notifier_block 
> >>*this, unsigned long mode,
> >>return NOTIFY_DONE;
> >>  }
> >>+static int sama5d3_restart(struct notifier_block *this, unsigned long mode,
> >>+   void *cmd)
> >>+{
> >>+   writel(cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | 
> >>AT91_RSTC_PROCRST),
> >>+   at91_rstc_base);
> >>+   return NOTIFY_DONE;
> >>+}
> >>+
> >>  static void __init at91_reset_status(struct platform_device *pdev)
> >>  {
> >>u32 reg = readl(at91_rstc_base + AT91_RSTC_SR);
> >>@@ -155,13 +163,13 @@ static void __init at91_reset_status(struct 
> >>platform_device *pdev)
> >>  static const struct of_device_id at91_ramc_of_match[] = {
> >>{ .compatible = "atmel,at91sam9260-sdramc", },
> >>{ .compatible = "atmel,at91sam9g45-ddramc", },
> >>-   { .compatible = "atmel,sama5d3-ddramc", },
> >>{ /* sentinel */ }
> >>  };
> >>  static const struct of_device_id at91_reset_of_match[] = {
> >>{ .compatible = "atmel,at91sam9260-rstc", .data = at91sam9260_restart },
> >>{ .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart },
> >>+   { .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart },
> >>{ /* sentinel */ }
> >>  };
> >>@@ -181,17 +189,21 @@ static int at91_reset_of_probe(struct platform_device 
> >>*pdev)
> >>return -ENODEV;
> >>}
> >>-   for_each_matching_node(np, at91_ramc_of_match) {
> >>-   at91_ramc_base[idx] = of_iomap(np, 0);
> >>-   if (!at91_ramc_base[idx]) {
> >>-   dev_err(&pdev->dev, "Could not map ram controller 
> >>address\n");
> >>-   return -ENODEV;
> >>+   match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
> >>+   at91_restart_nb.notifier_call = match->data;
> >>+
> >>+   if (match->data != sama5d3_restart) {
> >Using of_device_is_compatible seems more appropriate.
> >
> >Also, why are you changing the order of this loop and the notifier
> >registration?
> 
> I moved this order because I use the match->data to compare whether is
> sama5d3_restart. So I need to move this function (of_match_node) up.

Ah right, my bad.

Still, testing against the kernel pointer is not that great.

It would be great to use something explicit instead, like
of_device_is_compatible.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


Re: [PATCH] dmaengine: imx-sdma: Add device to device support

2015-07-09 Thread Shengjiu Wang
On Fri, Jul 10, 2015 at 11:52:05AM +0530, Vinod Koul wrote:
> On Tue, Jul 07, 2015 at 01:24:22PM +0800, Shengjiu Wang wrote:
> > > why not use set_bit(), you are modifying driver memory
> > Original driver all use the __set_bit. do you think we need to change
> > all the __set_bit to set_bit? And from the header file "arch/arm/include/asm
> > /bitops.h", the set_bit is same as __set_bit.
> New changes should be rightly done. __xxx denotes typically internal API to
> a subsystem, so if they are same I would suggest to use set_bit()
Ok, I agree with you.
> 
> > > > +   /*
> > > > +* If LWML(src_maxburst) > HWML(dst_maxburst), we need
> > > > +* swap LWML and HWML of INFO(A.3.2.5.1), also need swap
> > > > +* r0(event_mask[1]) and r1(event_mask[0]).
> > > > +*/
> > > > +   if (lwml > hwml) {
> > > > +   sdmac->watermark_level &= ~0xff00ff;
> > > Magic number?
> ??
I have add a description on V2 patch for the watermark_level definition.
> 
> > > Okay the direction is depreciated, so can you store both source and
> > > destination and use them based on direction in prepare()
> > > 
> > > Also I see driver is not doing this, so while at it, can you fix this is
> > > current code as well
> > > 
> > which prepare() do you mean? sdma_prep_dma_cyclic, sdma_prep_slave_sg?
> both have direction as an argument. So you need to use that
I have removed the direction checking. So I think don't need to change the
sdma_prep_dma_cyclic, sdma_prep_slave_sg.

Anyway please review the V2 patch for this, I have sent it out. In V2, I still
use the __set_bit. After you review the V2 patch, I will change them together.

Thanks.
wang shengjiu
> 
> -- 
> ~Vinod
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drm: Drop owner assignment from i2c_driver

2015-07-09 Thread Mark yao

On 2015年07月10日 13:36, Krzysztof Kozlowski wrote:

i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
  drivers/gpu/drm/bridge/ps8622.c | 1 -
  drivers/gpu/drm/bridge/ptn3460.c| 1 -
  drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 -
  3 files changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ps8622.c b/drivers/gpu/drm/bridge/ps8622.c
index 1a6607beb29f..be881e9fef8f 100644
--- a/drivers/gpu/drm/bridge/ps8622.c
+++ b/drivers/gpu/drm/bridge/ps8622.c
@@ -668,7 +668,6 @@ static struct i2c_driver ps8622_driver = {
.remove = ps8622_remove,
.driver = {
.name   = "ps8622",
-   .owner  = THIS_MODULE,
.of_match_table = ps8622_devices,
},
  };
diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c
index 1b1bf2384815..0ffa3a6a206a 100644
--- a/drivers/gpu/drm/bridge/ptn3460.c
+++ b/drivers/gpu/drm/bridge/ptn3460.c
@@ -400,7 +400,6 @@ static struct i2c_driver ptn3460_driver = {
.remove = ptn3460_remove,
.driver = {
.name   = "nxp,ptn3460",
-   .owner  = THIS_MODULE,
.of_match_table = ptn3460_match,
},
  };
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c 
b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 01b558fe3695..9a0c2911272a 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -555,7 +555,6 @@ static struct platform_driver rockchip_drm_platform_driver 
= {
.probe = rockchip_drm_platform_probe,
.remove = rockchip_drm_platform_remove,
.driver = {
-   .owner = THIS_MODULE,


But rockchip drm is platform driver not i2c_driver, why remove its .owner ?

-Mark

.name = "rockchip-drm",
.of_match_table = rockchip_drm_dt_ids,
.pm = &rockchip_drm_pm_ops,


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 02/12] Add parse_integer() (replacement for simple_strto*())

2015-07-09 Thread Alexey Dobriyan
On Thu, Jul 09, 2015 at 12:28:41PM -0700, Andrew Morton wrote:
> On Fri, 8 May 2015 21:30:29 +0300 Alexey Dobriyan  wrote:
> 
> > Enter parse_integer().
> > 
> > int parse_integer(const char *s, unsigned int base, T *val);
> 
> OK, I grabbed these.

Thanks! Just to note, first patch (accept "-0") is independent and
can be sent at any time.

> Let's see how it goes.  Were these patches still up to date?

Yes, kstrto*(), scanf() didn't change since when this was sent.

> Presumably we'd benefit from a checkpatch rule to alert people to the
> new regime.  Can you please suggest what such a rule should do?

It should say to switch from simple_strto*() to one of the 4 officially
sanctioned integer conversion routines: parse_integer(), kstrto*(),
kstrto*_from_user(), sscanf(). I'll send a patch.

> The macros in lib/test-parse-integer.c hurt my brain.

Well, yes, but the only interesting thing there are test tables.

Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mfd: Drop owner assignment from i2c_drivers

2015-07-09 Thread Lee Jones
On Fri, 10 Jul 2015, Krzysztof Kozlowski wrote:

> i2c_driver does not need to set an owner because i2c_register_driver()
> will set it.
> 
> Signed-off-by: Krzysztof Kozlowski 
> 
> ---
> 
> The coccinelle script which generated the patch was sent here:
> http://www.spinics.net/lists/kernel/msg2029903.html
> ---
>  drivers/mfd/88pm800.c | 1 -
>  drivers/mfd/88pm805.c | 1 -
>  drivers/mfd/88pm860x-core.c   | 1 -
>  drivers/mfd/aat2870-core.c| 1 -
>  drivers/mfd/ab3100-core.c | 1 -
>  drivers/mfd/adp5520.c | 1 -
>  drivers/mfd/arizona-i2c.c | 1 -
>  drivers/mfd/as3711.c  | 1 -
>  drivers/mfd/as3722.c  | 1 -
>  drivers/mfd/axp20x.c  | 1 -
>  drivers/mfd/bcm590xx.c| 1 -
>  drivers/mfd/cros_ec_i2c.c | 1 -
>  drivers/mfd/da903x.c  | 1 -
>  drivers/mfd/da9052-i2c.c  | 1 -
>  drivers/mfd/da9055-i2c.c  | 1 -
>  drivers/mfd/da9063-i2c.c  | 1 -
>  drivers/mfd/intel_soc_pmic_core.c | 1 -
>  drivers/mfd/lm3533-core.c | 1 -
>  drivers/mfd/lp3943.c  | 1 -
>  drivers/mfd/lp8788.c  | 1 -
>  drivers/mfd/max14577.c| 1 -
>  drivers/mfd/max77686.c| 1 -
>  drivers/mfd/max77693.c| 1 -
>  drivers/mfd/max8907.c | 1 -
>  drivers/mfd/max8925-i2c.c | 1 -
>  drivers/mfd/max8997.c | 1 -
>  drivers/mfd/max8998.c | 1 -
>  drivers/mfd/mc13xxx-i2c.c | 1 -
>  drivers/mfd/palmas.c  | 1 -
>  drivers/mfd/rc5t583.c | 1 -
>  drivers/mfd/retu-mfd.c| 1 -
>  drivers/mfd/sec-core.c| 1 -
>  drivers/mfd/si476x-i2c.c  | 1 -
>  drivers/mfd/smsc-ece1099.c| 1 -
>  drivers/mfd/stmpe-i2c.c   | 1 -
>  drivers/mfd/tc3589x.c | 1 -
>  drivers/mfd/tps6507x.c| 1 -
>  drivers/mfd/tps65090.c| 1 -
>  drivers/mfd/tps65217.c| 1 -
>  drivers/mfd/tps65218.c| 1 -
>  drivers/mfd/tps6586x.c| 1 -
>  drivers/mfd/tps65910.c| 1 -
>  drivers/mfd/tps65912-i2c.c| 1 -
>  drivers/mfd/tps80031.c| 1 -
>  drivers/mfd/twl6040.c | 1 -
>  drivers/mfd/wm831x-i2c.c  | 1 -
>  drivers/mfd/wm8350-i2c.c  | 1 -
>  drivers/mfd/wm8400-core.c | 1 -
>  drivers/mfd/wm8994-core.c | 1 -
>  49 files changed, 49 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c
> index 841717a2842c..f2d9fb4c4e8e 100644
> --- a/drivers/mfd/88pm800.c
> +++ b/drivers/mfd/88pm800.c
> @@ -609,7 +609,6 @@ static int pm800_remove(struct i2c_client *client)
>  static struct i2c_driver pm800_driver = {
>   .driver = {
>   .name = "88PM800",
> - .owner = THIS_MODULE,
>   .pm = &pm80x_pm_ops,
>   },
>   .probe = pm800_probe,
> diff --git a/drivers/mfd/88pm805.c b/drivers/mfd/88pm805.c
> index e9d50644660c..39f2302e137b 100644
> --- a/drivers/mfd/88pm805.c
> +++ b/drivers/mfd/88pm805.c
> @@ -267,7 +267,6 @@ static int pm805_remove(struct i2c_client *client)
>  static struct i2c_driver pm805_driver = {
>   .driver = {
>   .name = "88PM805",
> - .owner = THIS_MODULE,
>   .pm = &pm80x_pm_ops,
>   },
>   .probe = pm805_probe,
> diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
> index e03b7f45b8f7..cb47d6e00ebe 100644
> --- a/drivers/mfd/88pm860x-core.c
> +++ b/drivers/mfd/88pm860x-core.c
> @@ -1258,7 +1258,6 @@ MODULE_DEVICE_TABLE(of, pm860x_dt_ids);
>  static struct i2c_driver pm860x_driver = {
>   .driver = {
>   .name   = "88PM860x",
> - .owner  = THIS_MODULE,
>   .pm = &pm860x_pm_ops,
>   .of_match_table = pm860x_dt_ids,
>   },
> diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c
> index 4e6e03d63e12..29b6a2d4ac72 100644
> --- a/drivers/mfd/aat2870-core.c
> +++ b/drivers/mfd/aat2870-core.c
> @@ -500,7 +500,6 @@ MODULE_DEVICE_TABLE(i2c, aat2870_i2c_id_table);
>  static struct i2c_driver aat2870_i2c_driver = {
>   .driver = {
>   .name   = "aat2870",
> - .owner  = THIS_MODULE,
>   .pm = &aat2870_pm_ops,
>   },
>   .probe  = aat2870_i2c_probe,
> diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
> index 4659ac1db039..f0afb44271f8 100644
> --- a/drivers/mfd/ab3100-core.c
> +++ b/drivers/mfd/ab3100-core.c
> @@ -972,7 +972,6 @@ MODULE_DEVICE_TABLE(i2c, ab3100_id);
>  static struct i2c_driver ab3100_driver = {
>   .driver = {
>   .name   = "ab3100",
> - .owner  = THIS_MODULE,
>   },
>   .id_table   = ab3100_id,
>   .probe  = ab3100_probe,
> diff --git a/drivers/mfd/adp5520.c b/drivers/mfd/adp5520.c
> index f495b8b57dd7..ae88654595dc 100644
> --- a/drivers/mfd/adp5520.c
> +++ 

[git pull] drm fixes

2015-07-09 Thread Dave Airlie

Hi Linus,

back from vacation (another one is coming up in August though), thanks for
taking care of direct pulls while I was out.

a bunch of fixes for radeon, intel, omap and one amdkfd fix.

radeon fixes are all over, but it does fix some cursor corruption across 
suspend/resume
i915 should fix the second warn you were seeing, so let us know if not.
omap is a bunch of small fixes,

Regards,
Dave.

The following changes since commit c4b5fd3fb2058b650447372472ad24e2a989f9f6:

  Merge branch 'hpfs-patches' (patches from Mikulas Patocka) (2015-07-09 
13:35:39 -0700)

are available in the git repository at:

  git://people.freedesktop.org/~airlied/linux drm-fixes

for you to fetch changes up to 2d28b633c3fa8f53b919a5de86eb1c8e78dde818:

  Merge tag 'omapdrm-4.2-fixes' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-fixes 
(2015-07-10 15:59:35 +1000)


Alex Deucher (2):
  Revert "Revert "drm/radeon: dont switch vt on suspend""
  drm/radeon: disable vce init on cayman (v2)

Chris Wilson (1):
  drm/i915: Declare the swizzling unknown for L-shaped configurations

Christian König (3):
  drm/radeon: allways add the VM clear duplicate
  drm/radeon: check if BO_VA is set before adding it to the invalidation 
list
  drm/amdgpu: fix timeout calculation

Dan Carpenter (1):
  drm/radeon: fix underflow in r600_cp_dispatch_texture()

Daniel Vetter (2):
  drm/i915: Check crtc->active in intel_crtc_disable_planes
  drm/i915: Use crtc_state->active in primary check_plane func

Dave Airlie (4):
  Merge branch 'drm-fixes-4.2' of git://people.freedesktop.org/~agd5f/linux 
into drm-fixes
  Merge tag 'drm-amdkfd-fixes-2015-07-09' of 
git://people.freedesktop.org/~gabbayo/linux into drm-fixes
  Merge tag 'drm-intel-fixes-2015-07-09' of 
git://anongit.freedesktop.org/drm-intel into drm-fixes
  Merge tag 'omapdrm-4.2-fixes' of git://git.kernel.org/.../tomba/linux 
into drm-fixes

Fabian Frederick (1):
  drm/omap: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN

Grigori Goronzy (4):
  drm/radeon: use RCU query for GEM_BUSY syscall
  drm/radeon: fix HDP flushing
  drm/radeon: default to 2048 MB GART size on SI+
  drm/radeon: unpin cursor BOs on suspend and pin them again on resume (v2)

Imre Deak (1):
  drm/i915/chv: fix HW readout of the port PLL fractional divider

Maninder Singh (1):
  drm/amdkfd: validate pdd where it acquired first

Mario Kleiner (2):
  drm/radeon: Handle irqs only based on irq ring, not irq status regs.
  drm/amdgpu: Handle irqs only based on irq ring, not irq status regs.

Michel Dänzer (2):
  drm/radeon: Clean up reference counting and pinning of the cursor BOs
  drm/radeon: Fold radeon_set_cursor() into radeon_show_cursor()

Tomi Valkeinen (6):
  drm/omap: return error if dma_alloc_writecombine fails
  drm/omap: check that plane is inside crtc
  drm/omap: increase DMM transaction timeout
  drm/omap: fix omap_framebuffer_unpin() error handling
  drm/omap: fix omap_gem_put_paddr() error handling
  drm/omap: fix align_pitch() for 24 bits per pixel

Tvrtko Ursulin (1):
  drm/i915: Restore all GGTT VMAs on resume

Ville Syrjälä (1):
  Revert "drm/i915: Allocate context objects from stolen"

 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c  |   2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c   |  22 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c   |  22 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c|  22 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c |   9 +-
 drivers/gpu/drm/i915/i915_gem_context.c  |   4 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c  |  23 +-
 drivers/gpu/drm/i915/i915_gem_tiling.c   |  12 +-
 drivers/gpu/drm/i915/intel_display.c |  12 +-
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c |   2 +-
 drivers/gpu/drm/omapdrm/omap_drv.h   |   6 +-
 drivers/gpu/drm/omapdrm/omap_fb.c|  16 +-
 drivers/gpu/drm/omapdrm/omap_fbdev.c |   2 +-
 drivers/gpu/drm/omapdrm/omap_gem.c   |  26 +-
 drivers/gpu/drm/omapdrm/omap_plane.c |  26 ++
 drivers/gpu/drm/radeon/cik.c | 336 ++
 drivers/gpu/drm/radeon/evergreen.c   | 392 +--
 drivers/gpu/drm/radeon/ni.c  |  25 +-
 drivers/gpu/drm/radeon/r600.c| 155 ++--
 drivers/gpu/drm/radeon/r600_cp.c |   2 +-
 drivers/gpu/drm/radeon/radeon_cursor.c   | 109 -
 drivers/gpu/drm/radeon/radeon_device.c   |  66 --
 drivers/gpu/drm/radeon/radeon_fb.c   |   1 +
 drivers/gpu/drm/radeon/radeon_gem.c  |  12 +-
 drivers/gpu/drm/radeon/radeon_mode.h |   1 -
 drivers/gpu/drm/radeon/radeon_vm.c   |  40 ++--
 drivers/gpu/drm/radeon/si.c  | 336 ++
 27 files changed, 964 insertions(+), 717 deletions(-)

Re: [PATCH v2 3/5] usb: phy: add usb3.0 phy driver for mt65xx SoCs

2015-07-09 Thread Sascha Hauer
On Wed, Jul 08, 2015 at 05:41:05PM +0800, Chunfeng Yun wrote:
> Signed-off-by: Chunfeng Yun 
> ---
>  drivers/usb/phy/Kconfig   |  10 +
>  drivers/usb/phy/Makefile  |   1 +
>  drivers/usb/phy/phy-mt65xx-usb3.c | 856 
> ++
>  3 files changed, 867 insertions(+)
>  create mode 100644 drivers/usb/phy/phy-mt65xx-usb3.c
> 
> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
> index 869c0cfcad..66ded00 100644
> --- a/drivers/usb/phy/Kconfig
> +++ b/drivers/usb/phy/Kconfig
> @@ -152,6 +152,16 @@ config USB_MSM_OTG
> This driver is not supported on boards like trout which
> has an external PHY.
>  
> +config USB_MT65XX_USB3_PHY
> + tristate "Mediatek USB3.0 PHY controller Driver"
> + depends on ARCH_MEDIATEK || COMPILE_TEST
> + select USB_PHY
> + help
> +   Say 'Y' here to add support for Mediatek USB3.0 PHY driver
> +   for mt65xx SoCs. it supports two usb2.0 ports and
> +   one usb3.0 port.
> +   To compile this driver as a module, choose M here
> +
>  config USB_MV_OTG
>   tristate "Marvell USB OTG support"
>   depends on USB_EHCI_MV && USB_MV_UDC && PM
> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
> index e36ab1d..414ef57 100644
> --- a/drivers/usb/phy/Makefile
> +++ b/drivers/usb/phy/Makefile
> @@ -20,6 +20,7 @@ obj-$(CONFIG_USB_EHCI_TEGRA)+= 
> phy-tegra-usb.o
>  obj-$(CONFIG_USB_GPIO_VBUS)  += phy-gpio-vbus-usb.o
>  obj-$(CONFIG_USB_ISP1301)+= phy-isp1301.o
>  obj-$(CONFIG_USB_MSM_OTG)+= phy-msm-usb.o
> +obj-$(CONFIG_USB_MT65XX_USB3_PHY)+= phy-mt65xx-usb3.o
>  obj-$(CONFIG_USB_MV_OTG) += phy-mv-usb.o
>  obj-$(CONFIG_USB_MXS_PHY)+= phy-mxs-usb.o
>  obj-$(CONFIG_USB_RCAR_PHY)   += phy-rcar-usb.o
> diff --git a/drivers/usb/phy/phy-mt65xx-usb3.c 
> b/drivers/usb/phy/phy-mt65xx-usb3.c
> new file mode 100644
> index 000..38ee6f3
> --- /dev/null
> +++ b/drivers/usb/phy/phy-mt65xx-usb3.c
> @@ -0,0 +1,856 @@
> +/*
> + * Copyright (c) 2015 MediaTek Inc.
> + * Author: Chunfeng.Yun 
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +/*
> + * relative to MAC base address
> + */
> +#define SSUSB_USB3_MAC_CSR_BASE  (0x1400)
> +#define SSUSB_USB3_SYS_CSR_BASE  (0x1400)
> +#define SSUSB_USB2_CSR_BASE  (0x2400)

Please drop the unnecessary braces.

> +
> +/*
> + * for sifslv1 register
> + * relative to USB3_SIF_BASE base address
> + */
> +#define SSUSB_SIFSLV_IPPC_BASE   (0x700)
> +
> +/*
> + * for sifslv2 register
> + * relative to USB3_SIF_BASE base address
> + */
> +#define SSUSB_SIFSLV_U2PHY_COM_BASE  (0x10800)
> +#define SSUSB_SIFSLV_U3PHYD_BASE (0x10900)
> +#define SSUSB_SIFSLV_U2FREQ_BASE (0x10f00)
> +#define SSUSB_USB30_PHYA_SIV_B_BASE  (0x10b00)
> +#define SSUSB_SIFSLV_U3PHYA_DA_BASE  (0x10c00)
> +#define SSUSB_SIFSLV_SPLLC   (0x1)
> +
> +/*port1 refs. +0x800(refer to port0)*/
> +#define U3P_PORT_OFFSET (0x800)  /*based on port0 */
> +#define U3P_PHY_BASE(index) ((U3P_PORT_OFFSET) * (index))

According to my datasheet port(idx) base is at:

sif_base + 0x800 + 0x100 * idx

Am I missing something here?

> +
> +#define U3P_IP_PW_CTRL0  (SSUSB_SIFSLV_IPPC_BASE + 0x)
> +#define CTRL0_IP_SW_RST  (0x1 << 0)
> +
> +#define U3P_IP_PW_CTRL1  (SSUSB_SIFSLV_IPPC_BASE + 0x0004)
> +#define CTRL1_IP_HOST_PDN(0x1 << 0)
> +
> +#define U3P_IP_PW_CTRL2  (SSUSB_SIFSLV_IPPC_BASE + 0x0008)
> +#define CTRL2_IP_DEV_PDN (0x1 << 0)
> +
> +#define U3P_IP_PW_STS1   (SSUSB_SIFSLV_IPPC_BASE + 0x0010)
> +#define STS1_IP_SLEEP_STS(0x1 << 30)
> +#define STS1_U3_MAC_RST  (0x1 << 16)
> +#define STS1_SYS125_RST  (0x1 << 10)
> +#define STS1_REF_RST (0x1 << 8)
> +#define STS1_SYSPLL_STABLE   (0x1 << 0)
> +
> +#define U3P_IP_PW_STS2   (SSUSB_SIFSLV_IPPC_BASE + 0x0014)
> +#define STS2_U2_MAC_RST  (0x1 << 0)
> +
> +#define U3P_IP_XHCI_CAP  (SSUSB_SIFSLV_IPPC_BASE + 0x0024)
> +#define CAP_U3_PORT_NUM(p)   ((p) & 0xff)
> +#define CAP_U2_PORT_NUM(p)   (((p) >> 8) & 0xff)
> +
> +#define U3P_U3_CTRL_0P   (SSUSB_SIFSLV_IPPC_BASE + 0x0030)
> +#define CTRL_U3_PORT_HOST_SEL(0x1 << 2)
> +#defin

Re: [PATCH] team: set IFF_SLAVE on team ports

2015-07-09 Thread Jiri Pirko
Thu, Jul 09, 2015 at 05:36:55PM CEST, jblu...@infradead.org wrote:
>On Thu, Jul 9, 2015 at 12:07 PM, Jiri Pirko  wrote:
>> Thu, Jul 09, 2015 at 11:58:34AM CEST, jblu...@infradead.org wrote:
>>>The code in net/ipv6/addrconf.c:addrconf_notify() tests for IFF_SLAVE to
>>>decide if it should start the address configuration. Since team ports
>>>shouldn't get link-local addresses assigned lets set IFF_SLAVE when linking
>>>a port to the team master.
>>
>> I don't want to use IFF_SLAVE in team. Other master-slave devices are
>> not using that as well, for example bridge, ovs, etc.
>>
>
>Maybe they need to get fixed too. I've used that flag because it is
>documented as
>a "slave of a load balancer" which describes what a team port is.
>
>
>> I think that this should be fixed in addrconf_notify. It should lookup
>> if there is a master on top and bail out in that case.
>
>There are other virtual interfaces that have a master assigned and want to
>participate in IPv6 address configuration.

Can you give me an example?


>
>Unless we want to have a cascade of conditionals testing the priv_flags in
>addrconf_notify() this is asking for a new net_device_flags flag.
>Maybe something
>generic like IFF_L2PORT ?
>
>Thanks,
>Jan
>
>[ Jiri, sorry for getting that mail twice ]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] rtc: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/rtc/rtc-ab-b5ze-s3.c | 1 -
 drivers/rtc/rtc-bq32k.c  | 1 -
 drivers/rtc/rtc-ds1307.c | 1 -
 drivers/rtc/rtc-ds1374.c | 1 -
 drivers/rtc/rtc-ds3232.c | 1 -
 drivers/rtc/rtc-fm3130.c | 1 -
 drivers/rtc/rtc-hym8563.c| 1 -
 drivers/rtc/rtc-isl12057.c   | 1 -
 drivers/rtc/rtc-pcf2127.c| 1 -
 drivers/rtc/rtc-pcf85063.c   | 1 -
 drivers/rtc/rtc-pcf8523.c| 1 -
 drivers/rtc/rtc-pcf8563.c| 1 -
 drivers/rtc/rtc-pcf8583.c| 1 -
 drivers/rtc/rtc-rx8025.c | 1 -
 drivers/rtc/rtc-rx8581.c | 1 -
 15 files changed, 15 deletions(-)

diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
index b5cbc1bf5a3e..0fb1d767afa9 100644
--- a/drivers/rtc/rtc-ab-b5ze-s3.c
+++ b/drivers/rtc/rtc-ab-b5ze-s3.c
@@ -1020,7 +1020,6 @@ MODULE_DEVICE_TABLE(i2c, abb5zes3_id);
 static struct i2c_driver abb5zes3_driver = {
.driver = {
.name = DRV_NAME,
-   .owner = THIS_MODULE,
.pm = &abb5zes3_rtc_pm_ops,
.of_match_table = of_match_ptr(abb5zes3_dt_match),
},
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index 92679df6d6e2..2e4068084593 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32k.c
@@ -234,7 +234,6 @@ MODULE_DEVICE_TABLE(i2c, bq32k_id);
 static struct i2c_driver bq32k_driver = {
.driver = {
.name   = "bq32k",
-   .owner  = THIS_MODULE,
},
.probe  = bq32k_probe,
.id_table   = bq32k_id,
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index e16989c48a90..c51bc0a65afc 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1252,7 +1252,6 @@ static int ds1307_remove(struct i2c_client *client)
 static struct i2c_driver ds1307_driver = {
.driver = {
.name   = "rtc-ds1307",
-   .owner  = THIS_MODULE,
},
.probe  = ds1307_probe,
.remove = ds1307_remove,
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 167783fa7ac1..0ed9ed97a2ba 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -709,7 +709,6 @@ static SIMPLE_DEV_PM_OPS(ds1374_pm, ds1374_suspend, 
ds1374_resume);
 static struct i2c_driver ds1374_driver = {
.driver = {
.name = "rtc-ds1374",
-   .owner = THIS_MODULE,
.pm = &ds1374_pm,
},
.probe = ds1374_probe,
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 7e48e532214f..18f062f2a634 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -500,7 +500,6 @@ MODULE_DEVICE_TABLE(i2c, ds3232_id);
 static struct i2c_driver ds3232_driver = {
.driver = {
.name = "rtc-ds3232",
-   .owner = THIS_MODULE,
.pm = &ds3232_pm_ops,
},
.probe = ds3232_probe,
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c
index 83c3b3029fa7..576eadbba296 100644
--- a/drivers/rtc/rtc-fm3130.c
+++ b/drivers/rtc/rtc-fm3130.c
@@ -523,7 +523,6 @@ exit_free:
 static struct i2c_driver fm3130_driver = {
.driver = {
.name   = "rtc-fm3130",
-   .owner  = THIS_MODULE,
},
.probe  = fm3130_probe,
.id_table   = fm3130_id,
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
index e9da7959d3fe..097325d96db5 100644
--- a/drivers/rtc/rtc-hym8563.c
+++ b/drivers/rtc/rtc-hym8563.c
@@ -599,7 +599,6 @@ MODULE_DEVICE_TABLE(of, hym8563_dt_idtable);
 static struct i2c_driver hym8563_driver = {
.driver = {
.name   = "rtc-hym8563",
-   .owner  = THIS_MODULE,
.pm = &hym8563_pm_ops,
.of_match_table = hym8563_dt_idtable,
},
diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
index da818d3337ce..ee3e8dbcacaf 100644
--- a/drivers/rtc/rtc-isl12057.c
+++ b/drivers/rtc/rtc-isl12057.c
@@ -659,7 +659,6 @@ MODULE_DEVICE_TABLE(i2c, isl12057_id);
 static struct i2c_driver isl12057_driver = {
.driver = {
.name = DRV_NAME,
-   .owner = THIS_MODULE,
.pm = &isl12057_rtc_pm_ops,
.of_match_table = of_match_ptr(isl12057_dt_match),
},
diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 9bd842e97749..b7e1f4170ad1 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -217,7 +217,6 @@ MODULE_DEVICE_TABLE(of, pcf2127_of_match);
 static struct i2c_driver pcf2127_driver = {
.driver = {
.name   = "rtc-pcf2127",
-   .owner  = THIS_MODULE,
.of_match_ta

Re: [PATCH] st: Destroy st_index_idr on module exit

2015-07-09 Thread Hannes Reinecke
On 07/08/2015 05:24 PM, Johannes Thumshirn wrote:
> Destroy st_index_idr on module exit, reclaiming the allocated memory.
> 
> This was detected by the following semantic patch (written by Luis Rodriguez
> )
> 
> @ defines_module_init @
> declarer name module_init, module_exit;
> declarer name DEFINE_IDR;
> identifier init;
> @@
> 
> module_init(init);
> 
> @ defines_module_exit @
> identifier exit;
> @@
> 
> module_exit(exit);
> 
> @ declares_idr depends on defines_module_init && defines_module_exit @
> identifier idr;
> @@
> 
> DEFINE_IDR(idr);
> 
> @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
> identifier declares_idr.idr, defines_module_exit.exit;
> @@
> 
> exit(void)
> {
>  ...
>  idr_destroy(&idr);
>  ...
> }
> 
> @ missing_module_idr_destroy depends on declares_idr && defines_module_exit 
> && !on_exit_calls_destroy @
> identifier declares_idr.idr, defines_module_exit.exit;
> @@
> 
> exit(void)
> {
>  ...
>  +idr_destroy(&idr);
> }
> 
> 
> Signed-off-by: Johannes Thumshirn 
> ---
>  drivers/scsi/st.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
> index 3f25b8f..79ac024 100644
> --- a/drivers/scsi/st.c
> +++ b/drivers/scsi/st.c
> @@ -4427,6 +4427,7 @@ static void __exit exit_st(void)
>   unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
>ST_MAX_TAPE_ENTRIES);
>   class_unregister(&st_sysfs_class);
> + idr_destroy(&st_index_idr);
>   printk(KERN_INFO "st: Unloaded.\n");
>  }
>  
> 
Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
-- 
Dr. Hannes ReineckezSeries & Storage
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (2):
  rtc: Drop owner assignment from i2c_driver
  rtc: Drop owner assignment from platform_driver

 drivers/rtc/rtc-ab-b5ze-s3.c | 1 -
 drivers/rtc/rtc-bq32k.c  | 1 -
 drivers/rtc/rtc-ds1307.c | 1 -
 drivers/rtc/rtc-ds1374.c | 1 -
 drivers/rtc/rtc-ds3232.c | 1 -
 drivers/rtc/rtc-fm3130.c | 1 -
 drivers/rtc/rtc-hym8563.c| 1 -
 drivers/rtc/rtc-isl12057.c   | 1 -
 drivers/rtc/rtc-opal.c   | 1 -
 drivers/rtc/rtc-pcf2127.c| 1 -
 drivers/rtc/rtc-pcf85063.c   | 1 -
 drivers/rtc/rtc-pcf8523.c| 1 -
 drivers/rtc/rtc-pcf8563.c| 1 -
 drivers/rtc/rtc-pcf8583.c| 1 -
 drivers/rtc/rtc-rx8025.c | 1 -
 drivers/rtc/rtc-rx8581.c | 1 -
 16 files changed, 16 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] rtc: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.
---
 drivers/rtc/rtc-opal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c
index 7061dcae2b09..417d7b4a5cd8 100644
--- a/drivers/rtc/rtc-opal.c
+++ b/drivers/rtc/rtc-opal.c
@@ -236,7 +236,6 @@ static struct platform_driver opal_rtc_driver = {
.id_table   = opal_rtc_driver_ids,
.driver = {
.name   = DRVNAME,
-   .owner  = THIS_MODULE,
.of_match_table = opal_rtc_match,
},
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ALSA: aoa: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 sound/aoa/codecs/onyx.c | 1 -
 sound/aoa/codecs/tas.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index 23c371ecfb6b..a04edff8b729 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -1050,7 +1050,6 @@ MODULE_DEVICE_TABLE(i2c,onyx_i2c_id);
 static struct i2c_driver onyx_driver = {
.driver = {
.name = "aoa_codec_onyx",
-   .owner = THIS_MODULE,
},
.probe = onyx_i2c_probe,
.remove = onyx_i2c_remove,
diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c
index 364c7c4416e8..78ed1ffbf786 100644
--- a/sound/aoa/codecs/tas.c
+++ b/sound/aoa/codecs/tas.c
@@ -939,7 +939,6 @@ MODULE_DEVICE_TABLE(i2c,tas_i2c_id);
 static struct i2c_driver tas_driver = {
.driver = {
.name = "aoa_codec_tas",
-   .owner = THIS_MODULE,
},
.probe = tas_i2c_probe,
.remove = tas_i2c_remove,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] acpi-cpufreq: Fix an acpi perf unregister issue

2015-07-09 Thread Pan Xinhui

As policy->cpu may not be same in acpi_cpufreq_cpu_init and
acpi_cpufreq_cpu_exit. There is a risk that we use different *cpu* to
un/register acpi performance. So acpi_processor_unregister_performance
may not be able to do the cleanup work. That causes a memory leak. And
if there will be another acpi_processor_register_performance call, it
may also fail thanks to the internal check of pr->performace.

So we add a field *acpi_perf_cpu* to fix this issue.

Signed-off-by: Pan Xinhui 
---
Change from V1:
comments update
---
 drivers/cpufreq/acpi-cpufreq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 314a19e..8cad583 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -69,6 +69,7 @@ struct acpi_cpufreq_data {
struct cpufreq_frequency_table *freq_table;
unsigned int resume;
unsigned int cpu_feature;
+   unsigned int acpi_perf_cpu;
cpumask_var_t freqdomain_cpus;
 };
 
@@ -677,6 +678,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy 
*policy)
}
 
data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu);
+   data->acpi_perf_cpu = cpu;
policy->driver_data = data;
 
if (cpu_has(c, X86_FEATURE_CONSTANT_TSC))
@@ -861,7 +863,7 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy 
*policy)
if (data) {
policy->driver_data = NULL;
acpi_processor_unregister_performance(data->acpi_data,
- policy->cpu);
+ data->acpi_perf_cpu);
free_cpumask_var(data->freqdomain_cpus);
kfree(data->freq_table);
kfree(data);
-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] powerpc/powernv: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 arch/powerpc/platforms/powernv/opal-prd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/opal-prd.c 
b/arch/powerpc/platforms/powernv/opal-prd.c
index 4ece8e40dd54..e315e704cca7 100644
--- a/arch/powerpc/platforms/powernv/opal-prd.c
+++ b/arch/powerpc/platforms/powernv/opal-prd.c
@@ -434,7 +434,6 @@ static const struct of_device_id opal_prd_match[] = {
 static struct platform_driver opal_prd_driver = {
.driver = {
.name   = "opal-prd",
-   .owner  = THIS_MODULE,
.of_match_table = opal_prd_match,
},
.probe  = opal_prd_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] lpfc: Destroy lpfc_hba_index IDR on module exit

2015-07-09 Thread Hannes Reinecke
On 07/08/2015 05:19 PM, Johannes Thumshirn wrote:
> Destroy lpfc_hba_index IDR on module exit, reclaiming the allocated memory.
> 
> This was detected by the following semantic patch (written by Luis Rodriguez
> )
> 
> @ defines_module_init @
> declarer name module_init, module_exit;
> declarer name DEFINE_IDR;
> identifier init;
> @@
> 
> module_init(init);
> 
> @ defines_module_exit @
> identifier exit;
> @@
> 
> module_exit(exit);
> 
> @ declares_idr depends on defines_module_init && defines_module_exit @
> identifier idr;
> @@
> 
> DEFINE_IDR(idr);
> 
> @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
> identifier declares_idr.idr, defines_module_exit.exit;
> @@
> 
> exit(void)
> {
>  ...
>  idr_destroy(&idr);
>  ...
> }
> 
> @ missing_module_idr_destroy depends on declares_idr && defines_module_exit 
> && !on_exit_calls_destroy @
> identifier declares_idr.idr, defines_module_exit.exit;
> @@
> 
> exit(void)
> {
>  ...
>  +idr_destroy(&idr);
> }
> 
> 
> Signed-off-by: Johannes Thumshirn 
> ---
>  drivers/scsi/lpfc/lpfc_init.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index f962118..4bedb06 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -11477,6 +11477,7 @@ lpfc_exit(void)
>   free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order);
>   }
>   kfree(lpfc_used_cpu);
> + idr_destroy(&lpfc_hba_index);
>  }
>  
>  module_init(lpfc_init);
> 
Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
-- 
Dr. Hannes ReineckezSeries & Storage
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] pci: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/pci/host/pci-xgene-msi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
index 2d31d4d6fd08..9e1889e6aec7 100644
--- a/drivers/pci/host/pci-xgene-msi.c
+++ b/drivers/pci/host/pci-xgene-msi.c
@@ -582,7 +582,6 @@ error:
 static struct platform_driver xgene_msi_driver = {
.driver = {
.name = "xgene-msi",
-   .owner = THIS_MODULE,
.of_match_table = xgene_msi_match_table,
},
.probe = xgene_msi_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (2):
  video: fbdev: Drop owner assignment from i2c_driver
  video: fbdev: Drop owner assignment from platform_driver

 drivers/video/fbdev/omap2/displays-new/encoder-opa362.c | 1 -
 drivers/video/fbdev/ssd1307fb.c | 1 -
 2 files changed, 2 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] video: fbdev: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/video/fbdev/omap2/displays-new/encoder-opa362.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c 
b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
index a14d993f719d..8c246c213e06 100644
--- a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
+++ b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
@@ -266,7 +266,6 @@ static struct platform_driver opa362_driver = {
.remove = __exit_p(opa362_remove),
.driver = {
.name   = "amplifier-opa362",
-   .owner  = THIS_MODULE,
.of_match_table = opa362_of_match,
.suppress_bind_attrs = true,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] vfio: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/vfio/platform/vfio_platform.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/vfio/platform/vfio_platform.c 
b/drivers/vfio/platform/vfio_platform.c
index cef645c83996..09a8caa4eda9 100644
--- a/drivers/vfio/platform/vfio_platform.c
+++ b/drivers/vfio/platform/vfio_platform.c
@@ -91,7 +91,6 @@ static struct platform_driver vfio_platform_driver = {
.remove = vfio_platform_remove,
.driver = {
.name   = "vfio-platform",
-   .owner  = THIS_MODULE,
},
 };
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] video: fbdev: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/video/fbdev/ssd1307fb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 3e153c06131a..b6edd28b267f 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -719,7 +719,6 @@ static struct i2c_driver ssd1307fb_driver = {
.driver = {
.name = "ssd1307fb",
.of_match_table = ssd1307fb_of_match,
-   .owner = THIS_MODULE,
},
 };
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] w1: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/w1/masters/ds2482.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index a674409edfb3..b05e8fefbabd 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(i2c, ds2482_id);
 
 static struct i2c_driver ds2482_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "ds2482",
},
.probe  = ds2482_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] tty: serial: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/tty/serial/sc16is7xx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 9e6576004a42..bbeb33561737 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1369,7 +1369,6 @@ MODULE_DEVICE_TABLE(i2c, sc16is7xx_i2c_id_table);
 static struct i2c_driver sc16is7xx_i2c_uart_driver = {
.driver = {
.name   = SC16IS7XX_NAME,
-   .owner  = THIS_MODULE,
.of_match_table = of_match_ptr(sc16is7xx_dt_ids),
},
.probe  = sc16is7xx_i2c_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] tty: serial: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/tty/serial/8250/8250_ingenic.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_ingenic.c 
b/drivers/tty/serial/8250/8250_ingenic.c
index 21bf81fe794f..7c1e4be48e7b 100644
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
@@ -252,7 +252,6 @@ MODULE_DEVICE_TABLE(of, of_match);
 static struct platform_driver ingenic_uart_platform_driver = {
.driver = {
.name   = "ingenic-uart",
-   .owner  = THIS_MODULE,
.of_match_table = of_match,
},
.probe  = ingenic_uart_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (2):
  tty: serial: Drop owner assignment from platform_driver
  tty: serial: Drop owner assignment from i2c_driver

 drivers/tty/serial/8250/8250_ingenic.c | 1 -
 drivers/tty/serial/sc16is7xx.c | 1 -
 2 files changed, 2 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/3] staging: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c 
b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
index 0f524bb7b41d..1f9ba8beb061 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
@@ -1126,7 +1126,6 @@ MODULE_DEVICE_TABLE(i2c, synaptics_rmi4_id_table);
 static struct i2c_driver synaptics_rmi4_driver = {
.driver = {
.name   =   DRIVER_NAME,
-   .owner  =   THIS_MODULE,
.pm =   &synaptics_rmi4_dev_pm_ops,
},
.probe  =   synaptics_rmi4_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/3] staging: media: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/staging/media/lirc/lirc_zilog.c | 1 -
 drivers/staging/media/mn88472/mn88472.c | 1 -
 drivers/staging/media/mn88473/mn88473.c | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_zilog.c 
b/drivers/staging/media/lirc/lirc_zilog.c
index 261e27d6b054..d032745081ee 100644
--- a/drivers/staging/media/lirc/lirc_zilog.c
+++ b/drivers/staging/media/lirc/lirc_zilog.c
@@ -1367,7 +1367,6 @@ static const struct i2c_device_id ir_transceiver_id[] = {
 
 static struct i2c_driver driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "Zilog/Hauppauge i2c IR",
},
.probe  = ir_probe,
diff --git a/drivers/staging/media/mn88472/mn88472.c 
b/drivers/staging/media/mn88472/mn88472.c
index a8d45f44765c..cf2e96bcf395 100644
--- a/drivers/staging/media/mn88472/mn88472.c
+++ b/drivers/staging/media/mn88472/mn88472.c
@@ -561,7 +561,6 @@ MODULE_DEVICE_TABLE(i2c, mn88472_id_table);
 
 static struct i2c_driver mn88472_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "mn88472",
},
.probe  = mn88472_probe,
diff --git a/drivers/staging/media/mn88473/mn88473.c 
b/drivers/staging/media/mn88473/mn88473.c
index f9146a146d07..a222e99935d2 100644
--- a/drivers/staging/media/mn88473/mn88473.c
+++ b/drivers/staging/media/mn88473/mn88473.c
@@ -507,7 +507,6 @@ MODULE_DEVICE_TABLE(i2c, mn88473_id_table);
 
 static struct i2c_driver mn88473_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "mn88473",
},
.probe  = mn88473_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] thermal: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/thermal/hisi_thermal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index d5dd357ba57c..b49f97c734d0 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -405,7 +405,6 @@ static SIMPLE_DEV_PM_OPS(hisi_thermal_pm_ops,
 static struct platform_driver hisi_thermal_driver = {
.driver = {
.name   = "hisi_thermal",
-   .owner  = THIS_MODULE,
.pm = &hisi_thermal_pm_ops,
.of_match_table = of_hisi_thermal_match,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/3] staging: iio: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/staging/iio/addac/adt7316-i2c.c | 1 -
 drivers/staging/iio/light/isl29018.c| 1 -
 drivers/staging/iio/light/isl29028.c| 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/staging/iio/addac/adt7316-i2c.c 
b/drivers/staging/iio/addac/adt7316-i2c.c
index 75ddd4f801a3..78fe0b557280 100644
--- a/drivers/staging/iio/addac/adt7316-i2c.c
+++ b/drivers/staging/iio/addac/adt7316-i2c.c
@@ -124,7 +124,6 @@ static struct i2c_driver adt7316_driver = {
.driver = {
.name = "adt7316",
.pm = ADT7316_PM_OPS,
-   .owner  = THIS_MODULE,
},
.probe = adt7316_i2c_probe,
.id_table = adt7316_i2c_id,
diff --git a/drivers/staging/iio/light/isl29018.c 
b/drivers/staging/iio/light/isl29018.c
index e646c5d24004..019ba5245c23 100644
--- a/drivers/staging/iio/light/isl29018.c
+++ b/drivers/staging/iio/light/isl29018.c
@@ -838,7 +838,6 @@ static struct i2c_driver isl29018_driver = {
.name = "isl29018",
.acpi_match_table = ACPI_PTR(isl29018_acpi_match),
.pm = ISL29018_PM_OPS,
-   .owner = THIS_MODULE,
.of_match_table = isl29018_of_match,
},
.probe   = isl29018_probe,
diff --git a/drivers/staging/iio/light/isl29028.c 
b/drivers/staging/iio/light/isl29028.c
index e5b2fdc2334b..cd6f2727aa58 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/drivers/staging/iio/light/isl29028.c
@@ -547,7 +547,6 @@ static struct i2c_driver isl29028_driver = {
.class  = I2C_CLASS_HWMON,
.driver  = {
.name = "isl29028",
-   .owner = THIS_MODULE,
.of_match_table = isl29028_of_match,
},
.probe   = isl29028_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (3):
  staging: iio: Drop owner assignment from i2c_driver
  staging: media: Drop owner assignment from i2c_driver
  staging: Drop owner assignment from i2c_driver

 drivers/staging/iio/addac/adt7316-i2c.c   | 1 -
 drivers/staging/iio/light/isl29018.c  | 1 -
 drivers/staging/iio/light/isl29028.c  | 1 -
 drivers/staging/media/lirc/lirc_zilog.c   | 1 -
 drivers/staging/media/mn88472/mn88472.c   | 1 -
 drivers/staging/media/mn88473/mn88473.c   | 1 -
 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 1 -
 7 files changed, 7 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] crypto: Drop owner assignment from platform_driver

2015-07-09 Thread Boris Brezillon
On Fri, 10 Jul 2015 14:46:16 +0900
Krzysztof Kozlowski  wrote:

> platform_driver does not need to set an owner because
> platform_driver_register() will set it.
> 
> Signed-off-by: Krzysztof Kozlowski 

Acked-by: Boris Brezillon 
> 
> ---
> 
> The coccinelle script which generated the patch was sent here:
> http://www.spinics.net/lists/kernel/msg2029903.html
> ---
>  drivers/crypto/marvell/cesa.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
> index 1c6f98dd88f4..0643e3366e33 100644
> --- a/drivers/crypto/marvell/cesa.c
> +++ b/drivers/crypto/marvell/cesa.c
> @@ -533,7 +533,6 @@ static struct platform_driver marvell_cesa = {
>   .probe  = mv_cesa_probe,
>   .remove = mv_cesa_remove,
>   .driver = {
> - .owner  = THIS_MODULE,
>   .name   = "marvell-cesa",
>   .of_match_table = mv_cesa_of_match_table,
>   },



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] spi: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/spi/spi-xcomm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
index bb478dccf1d8..d0561a8d9f16 100644
--- a/drivers/spi/spi-xcomm.c
+++ b/drivers/spi/spi-xcomm.c
@@ -241,7 +241,6 @@ static const struct i2c_device_id spi_xcomm_ids[] = {
 static struct i2c_driver spi_xcomm_driver = {
.driver = {
.name   = "spi-xcomm",
-   .owner  = THIS_MODULE,
},
.id_table   = spi_xcomm_ids,
.probe  = spi_xcomm_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] soc: mediatek: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c 
b/drivers/soc/mediatek/mtk-pmic-wrap.c
index f432291feee9..8bc7b41b09fd 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -926,7 +926,6 @@ err_out1:
 static struct platform_driver pwrap_drv = {
.driver = {
.name = "mt-pmic-pwrap",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(of_pwrap_match_tbl),
},
.probe = pwrap_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/net/ethernet/hisilicon/hip04_eth.c  | 1 -
 drivers/net/ethernet/hisilicon/hip04_mdio.c | 1 -
 drivers/net/ethernet/ti/netcp_core.c| 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c 
b/drivers/net/ethernet/hisilicon/hip04_eth.c
index d49bee38cd31..cc2d8b4b18e3 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -965,7 +965,6 @@ static struct platform_driver hip04_mac_driver = {
.remove = hip04_remove,
.driver = {
.name   = DRV_NAME,
-   .owner  = THIS_MODULE,
.of_match_table = hip04_mac_match,
},
 };
diff --git a/drivers/net/ethernet/hisilicon/hip04_mdio.c 
b/drivers/net/ethernet/hisilicon/hip04_mdio.c
index b3bac25db99c..fca0a5be1f0f 100644
--- a/drivers/net/ethernet/hisilicon/hip04_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hip04_mdio.c
@@ -174,7 +174,6 @@ static struct platform_driver hip04_mdio_driver = {
.remove = hip04_mdio_remove,
.driver = {
.name = "hip04-mdio",
-   .owner = THIS_MODULE,
.of_match_table = hip04_mdio_match,
},
 };
diff --git a/drivers/net/ethernet/ti/netcp_core.c 
b/drivers/net/ethernet/ti/netcp_core.c
index 5ec4ed3f6c8d..3e47202b9010 100644
--- a/drivers/net/ethernet/ti/netcp_core.c
+++ b/drivers/net/ethernet/ti/netcp_core.c
@@ -2142,7 +2142,6 @@ MODULE_DEVICE_TABLE(of, of_match);
 static struct platform_driver netcp_driver = {
.driver = {
.name   = "netcp-1.0",
-   .owner  = THIS_MODULE,
.of_match_table = of_match,
},
.probe = netcp_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] pwm: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/pwm/pwm-pca9685.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c
index 34b5c275a92a..bd5f0276db04 100644
--- a/drivers/pwm/pwm-pca9685.c
+++ b/drivers/pwm/pwm-pca9685.c
@@ -285,7 +285,6 @@ MODULE_DEVICE_TABLE(of, pca9685_dt_ids);
 static struct i2c_driver pca9685_i2c_driver = {
.driver = {
.name = "pca9685-pwm",
-   .owner = THIS_MODULE,
.of_match_table = pca9685_dt_ids,
},
.probe = pca9685_pwm_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] pinctrl: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/pinctrl/sirf/pinctrl-atlas7.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pinctrl/sirf/pinctrl-atlas7.c 
b/drivers/pinctrl/sirf/pinctrl-atlas7.c
index 9384e0aa3996..d6e80fe1c7f7 100644
--- a/drivers/pinctrl/sirf/pinctrl-atlas7.c
+++ b/drivers/pinctrl/sirf/pinctrl-atlas7.c
@@ -4621,7 +4621,6 @@ failed:
 static struct platform_driver atlas7_gpio_driver = {
.driver = {
.name = "atlas7-gpio",
-   .owner = THIS_MODULE,
.of_match_table = atlas7_gpio_ids,
},
.probe = atlas7_gpio_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] phy: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/phy/phy-berlin-usb.c| 1 -
 drivers/phy/phy-miphy28lp.c | 1 -
 drivers/phy/phy-qcom-ufs-qmp-14nm.c | 1 -
 drivers/phy/phy-qcom-ufs-qmp-20nm.c | 1 -
 drivers/phy/phy-rockchip-usb.c  | 1 -
 5 files changed, 5 deletions(-)

diff --git a/drivers/phy/phy-berlin-usb.c b/drivers/phy/phy-berlin-usb.c
index c6fc95b53083..d7431f6ab975 100644
--- a/drivers/phy/phy-berlin-usb.c
+++ b/drivers/phy/phy-berlin-usb.c
@@ -207,7 +207,6 @@ static struct platform_driver phy_berlin_usb_driver = {
.probe  = phy_berlin_usb_probe,
.driver = {
.name   = "phy-berlin-usb",
-   .owner  = THIS_MODULE,
.of_match_table = phy_berlin_sata_of_match,
 },
 };
diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
index 5e257ef7ac05..677c290f4b14 100644
--- a/drivers/phy/phy-miphy28lp.c
+++ b/drivers/phy/phy-miphy28lp.c
@@ -1268,7 +1268,6 @@ static struct platform_driver miphy28lp_driver = {
.probe = miphy28lp_probe,
.driver = {
.name = "miphy28lp-phy",
-   .owner = THIS_MODULE,
.of_match_table = miphy28lp_of_match,
}
 };
diff --git a/drivers/phy/phy-qcom-ufs-qmp-14nm.c 
b/drivers/phy/phy-qcom-ufs-qmp-14nm.c
index f5fc50a9fce7..e1eea1b379fc 100644
--- a/drivers/phy/phy-qcom-ufs-qmp-14nm.c
+++ b/drivers/phy/phy-qcom-ufs-qmp-14nm.c
@@ -191,7 +191,6 @@ static struct platform_driver ufs_qcom_phy_qmp_14nm_driver 
= {
.driver = {
.of_match_table = ufs_qcom_phy_qmp_14nm_of_match,
.name = "ufs_qcom_phy_qmp_14nm",
-   .owner = THIS_MODULE,
},
 };
 
diff --git a/drivers/phy/phy-qcom-ufs-qmp-20nm.c 
b/drivers/phy/phy-qcom-ufs-qmp-20nm.c
index 8332f96b2c4a..fde8c876823b 100644
--- a/drivers/phy/phy-qcom-ufs-qmp-20nm.c
+++ b/drivers/phy/phy-qcom-ufs-qmp-20nm.c
@@ -247,7 +247,6 @@ static struct platform_driver ufs_qcom_phy_qmp_20nm_driver 
= {
.driver = {
.of_match_table = ufs_qcom_phy_qmp_20nm_of_match,
.name = "ufs_qcom_phy_qmp_20nm",
-   .owner = THIS_MODULE,
},
 };
 
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 7d4c33643768..bf78721b58f4 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -146,7 +146,6 @@ static struct platform_driver rockchip_usb_driver = {
.probe  = rockchip_usb_phy_probe,
.driver = {
.name   = "rockchip-usb-phy",
-   .owner  = THIS_MODULE,
.of_match_table = rockchip_usb_phy_dt_ids,
},
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] of: Drop owner assignment from platform and i2c driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver and i2c_driver do not need to set an owner because core
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/of/unittest.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 18016341d5a9..9f71770b6226 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -979,7 +979,6 @@ static struct platform_driver unittest_driver = {
.remove = unittest_remove,
.driver = {
.name   = "unittest",
-   .owner  = THIS_MODULE,
.of_match_table = of_match_ptr(unittest_match),
},
 };
@@ -1666,7 +1665,6 @@ static const struct i2c_device_id unittest_i2c_dev_id[] = 
{
 static struct i2c_driver unittest_i2c_dev_driver = {
.driver = {
.name = "unittest-i2c-dev",
-   .owner = THIS_MODULE,
},
.probe = unittest_i2c_dev_probe,
.remove = unittest_i2c_dev_remove,
@@ -1761,7 +1759,6 @@ static const struct i2c_device_id unittest_i2c_mux_id[] = 
{
 static struct i2c_driver unittest_i2c_mux_driver = {
.driver = {
.name = "unittest-i2c-mux",
-   .owner = THIS_MODULE,
},
.probe = unittest_i2c_mux_probe,
.remove = unittest_i2c_mux_remove,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH?] Livelock in pick_next_task_fair() / idle_balance()

2015-07-09 Thread Yuyang Du
On Thu, Jul 09, 2015 at 02:53:14PM +0100, Morten Rasmussen wrote:
> On Mon, Jul 06, 2015 at 04:12:41AM +0800, Yuyang Du wrote:
> > Hi Morten,
> > 
> > On Fri, Jul 03, 2015 at 10:34:41AM +0100, Morten Rasmussen wrote:
> > > > > IOW, since task groups include blocked load in the load_avg_contrib 
> > > > > (see
> > > > > __update_group_entity_contrib() and 
> > > > > __update_cfs_rq_tg_load_contrib()) the
> > > > > imbalance includes blocked load and hence env->imbalance >=
> > > > > sum(task_h_load(p)) for all tasks p on the rq. Which leads to
> > > > > detach_tasks() emptying the rq completely in the reported scenario 
> > > > > where
> > > > > blocked load > runnable load.
> > > > 
> > > > Whenever I want to know the load avg concerning task group, I need to
> > > > walk through the complete codes again, I prefer not to do it this time.
> > > > But it should not be that simply to say "the 118 comes from the blocked 
> > > > load".
> > > 
> > > But the whole hierarchy of group entities is updated each time we enqueue
> > > or dequeue a task. I don't see how the group entity load_avg_contrib is
> > > not up to date? Why do you need to update it again?
> > > 
> > > In any case, we have one task in the group hierarchy which has a
> > > load_avg_contrib of 0 and the grand-grand parent group entity has a
> > > load_avg_contrib of 118 and no additional tasks. That load contribution
> > > must be from tasks which are no longer around on the rq? No?
> > 
> > load_avg_contrib has WEIGHT inside, so the most I can say is:
> > SE: 8f456e00's load_avg_contrib 118 = (its cfs_rq's runnable + blocked) / 
> > (tg->load_avg + 1) * tg->shares
> > 
> > The tg->shares is probably 1024 (at least 911). So we are just left with:
> > 
> > cfs_rq / tg = 11.5%
> 
> Yes, we also know that there is only one runnable task in the task group
> hierarchy and its contribution is 0. Hence the rest must be from
> non-runnable tasks belonging to some child group.

Agreed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] nfc: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/nfc/nxp-nci/i2c.c  | 1 -
 drivers/nfc/pn544/i2c.c| 1 -
 drivers/nfc/st-nci/i2c.c   | 1 -
 drivers/nfc/st21nfca/i2c.c | 1 -
 4 files changed, 4 deletions(-)

diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index 2f77f1d03638..6c5e63cd0022 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -450,7 +450,6 @@ MODULE_DEVICE_TABLE(acpi, acpi_id);
 static struct i2c_driver nxp_nci_i2c_driver = {
.driver = {
   .name = NXP_NCI_I2C_DRIVER_NAME,
-  .owner  = THIS_MODULE,
   .acpi_match_table = ACPI_PTR(acpi_id),
   .of_match_table = of_match_ptr(of_nxp_nci_i2c_match),
  },
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index fa75c53f3fa5..a095523309cf 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -1162,7 +1162,6 @@ MODULE_DEVICE_TABLE(of, of_pn544_i2c_match);
 static struct i2c_driver pn544_hci_i2c_driver = {
.driver = {
   .name = PN544_HCI_I2C_DRIVER_NAME,
-  .owner  = THIS_MODULE,
   .of_match_table = of_match_ptr(of_pn544_i2c_match),
   .acpi_match_table = ACPI_PTR(pn544_hci_i2c_acpi_match),
  },
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c
index 06175ce769bb..c21c45c656c0 100644
--- a/drivers/nfc/st-nci/i2c.c
+++ b/drivers/nfc/st-nci/i2c.c
@@ -370,7 +370,6 @@ MODULE_DEVICE_TABLE(of, of_st_nci_i2c_match);
 
 static struct i2c_driver st_nci_i2c_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = ST_NCI_I2C_DRIVER_NAME,
.of_match_table = of_match_ptr(of_st_nci_i2c_match),
},
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index a32143951616..6f987fa36371 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -680,7 +680,6 @@ MODULE_DEVICE_TABLE(of, of_st21nfca_i2c_match);
 
 static struct i2c_driver st21nfca_hci_i2c_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = ST21NFCA_HCI_I2C_DRIVER_NAME,
.of_match_table = of_match_ptr(of_st21nfca_i2c_match),
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] misc: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/misc/ad525x_dpot-i2c.c | 1 -
 drivers/misc/apds990x.c| 1 -
 drivers/misc/bh1770glc.c   | 1 -
 drivers/misc/bmp085-i2c.c  | 1 -
 drivers/misc/eeprom/at24.c | 1 -
 drivers/misc/isl29003.c| 1 -
 drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 1 -
 drivers/misc/ti-st/st_kim.c| 1 -
 drivers/misc/tsl2550.c | 1 -
 9 files changed, 9 deletions(-)

diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c
index 705b881e186d..d11187d36ddd 100644
--- a/drivers/misc/ad525x_dpot-i2c.c
+++ b/drivers/misc/ad525x_dpot-i2c.c
@@ -106,7 +106,6 @@ MODULE_DEVICE_TABLE(i2c, ad_dpot_id);
 static struct i2c_driver ad_dpot_i2c_driver = {
.driver = {
.name   = "ad_dpot",
-   .owner  = THIS_MODULE,
},
.probe  = ad_dpot_i2c_probe,
.remove = ad_dpot_i2c_remove,
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index 3739ffa9cdf1..a3e789b85cc8 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -1275,7 +1275,6 @@ static const struct dev_pm_ops apds990x_pm_ops = {
 static struct i2c_driver apds990x_driver = {
.driver  = {
.name   = "apds990x",
-   .owner  = THIS_MODULE,
.pm = &apds990x_pm_ops,
},
.probe= apds990x_probe,
diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index b756381b8250..753d7ecdadaa 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -1396,7 +1396,6 @@ static const struct dev_pm_ops bh1770_pm_ops = {
 static struct i2c_driver bh1770_driver = {
.driver  = {
.name   = "bh1770glc",
-   .owner  = THIS_MODULE,
.pm = &bh1770_pm_ops,
},
.probe= bh1770_probe,
diff --git a/drivers/misc/bmp085-i2c.c b/drivers/misc/bmp085-i2c.c
index a7c16295b816..f35c218aaa1a 100644
--- a/drivers/misc/bmp085-i2c.c
+++ b/drivers/misc/bmp085-i2c.c
@@ -66,7 +66,6 @@ MODULE_DEVICE_TABLE(i2c, bmp085_id);
 
 static struct i2c_driver bmp085_i2c_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = BMP085_NAME,
},
.id_table   = bmp085_id,
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 2d3db81be099..8c157229ac82 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -689,7 +689,6 @@ static int at24_remove(struct i2c_client *client)
 static struct i2c_driver at24_driver = {
.driver = {
.name = "at24",
-   .owner = THIS_MODULE,
},
.probe = at24_probe,
.remove = at24_remove,
diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c
index 12c30b486b27..976df0013633 100644
--- a/drivers/misc/isl29003.c
+++ b/drivers/misc/isl29003.c
@@ -465,7 +465,6 @@ MODULE_DEVICE_TABLE(i2c, isl29003_id);
 static struct i2c_driver isl29003_driver = {
.driver = {
.name   = ISL29003_DRV_NAME,
-   .owner  = THIS_MODULE,
.pm = ISL29003_PM_OPS,
},
.probe  = isl29003_probe,
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c 
b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
index e3e7f1dc27ba..0c3bb7e3ee80 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -274,7 +274,6 @@ static const struct dev_pm_ops lis3_pm_ops = {
 static struct i2c_driver lis3lv02d_i2c_driver = {
.driver  = {
.name   = DRV_NAME,
-   .owner  = THIS_MODULE,
.pm = &lis3_pm_ops,
.of_match_table = of_match_ptr(lis3lv02d_i2c_dt_ids),
},
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 5027b8ffae43..c84093e639e0 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -939,7 +939,6 @@ static struct platform_driver kim_platform_driver = {
.resume = kim_resume,
.driver = {
.name = "kim",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(kim_of_match),
},
 };
diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
index b00335652e52..87a13374fdc0 100644
--- a/drivers/misc/tsl2550.c
+++ b/drivers/misc/tsl2550.c
@@ -446,7 +446,6 @@ MODULE_DEVICE_TABLE(i2c, tsl2550_id);
 static struct i2c_driver tsl2550_driver = {
.driver = {
.name   = TSL2550_DRV_NAME,
-   .owner  = THIS_MODULE,
.pm = TSL2550_PM_OPS,
},
.probe  = tsl2550_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ker

[PATCH 1/7] [media] dvb-frontends: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/dvb-frontends/a8293.c  | 1 -
 drivers/media/dvb-frontends/af9033.c | 1 -
 drivers/media/dvb-frontends/au8522_decoder.c | 1 -
 drivers/media/dvb-frontends/m88ds3103.c  | 1 -
 drivers/media/dvb-frontends/rtl2830.c| 1 -
 drivers/media/dvb-frontends/rtl2832.c| 1 -
 drivers/media/dvb-frontends/si2168.c | 1 -
 drivers/media/dvb-frontends/sp2.c| 1 -
 drivers/media/dvb-frontends/tda10071.c   | 1 -
 drivers/media/dvb-frontends/ts2020.c | 1 -
 10 files changed, 10 deletions(-)

diff --git a/drivers/media/dvb-frontends/a8293.c 
b/drivers/media/dvb-frontends/a8293.c
index 97ecbe01034c..df3c9758a903 100644
--- a/drivers/media/dvb-frontends/a8293.c
+++ b/drivers/media/dvb-frontends/a8293.c
@@ -234,7 +234,6 @@ MODULE_DEVICE_TABLE(i2c, a8293_id_table);
 
 static struct i2c_driver a8293_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "a8293",
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/dvb-frontends/af9033.c 
b/drivers/media/dvb-frontends/af9033.c
index 59018afaa95f..bc35206a0821 100644
--- a/drivers/media/dvb-frontends/af9033.c
+++ b/drivers/media/dvb-frontends/af9033.c
@@ -1387,7 +1387,6 @@ MODULE_DEVICE_TABLE(i2c, af9033_id_table);
 
 static struct i2c_driver af9033_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "af9033",
},
.probe  = af9033_probe,
diff --git a/drivers/media/dvb-frontends/au8522_decoder.c 
b/drivers/media/dvb-frontends/au8522_decoder.c
index 33aa9410b624..28d7dc2fee34 100644
--- a/drivers/media/dvb-frontends/au8522_decoder.c
+++ b/drivers/media/dvb-frontends/au8522_decoder.c
@@ -820,7 +820,6 @@ MODULE_DEVICE_TABLE(i2c, au8522_id);
 
 static struct i2c_driver au8522_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "au8522",
},
.probe  = au8522_probe,
diff --git a/drivers/media/dvb-frontends/m88ds3103.c 
b/drivers/media/dvb-frontends/m88ds3103.c
index e9b2d2b69b1d..ff31e7a01ca9 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -1495,7 +1495,6 @@ MODULE_DEVICE_TABLE(i2c, m88ds3103_id_table);
 
 static struct i2c_driver m88ds3103_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "m88ds3103",
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/dvb-frontends/rtl2830.c 
b/drivers/media/dvb-frontends/rtl2830.c
index 3d01f4f22aca..b792f305cf15 100644
--- a/drivers/media/dvb-frontends/rtl2830.c
+++ b/drivers/media/dvb-frontends/rtl2830.c
@@ -915,7 +915,6 @@ MODULE_DEVICE_TABLE(i2c, rtl2830_id_table);
 
 static struct i2c_driver rtl2830_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "rtl2830",
},
.probe  = rtl2830_probe,
diff --git a/drivers/media/dvb-frontends/rtl2832.c 
b/drivers/media/dvb-frontends/rtl2832.c
index 822ea4b7a7ff..78b87b260d74 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -1319,7 +1319,6 @@ MODULE_DEVICE_TABLE(i2c, rtl2832_id_table);
 
 static struct i2c_driver rtl2832_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "rtl2832",
},
.probe  = rtl2832_probe,
diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
index 25e238c370e5..81788c5a44d8 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -757,7 +757,6 @@ MODULE_DEVICE_TABLE(i2c, si2168_id_table);
 
 static struct i2c_driver si2168_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "si2168",
},
.probe  = si2168_probe,
diff --git a/drivers/media/dvb-frontends/sp2.c 
b/drivers/media/dvb-frontends/sp2.c
index 8fd42767e263..43d47dfcc7b8 100644
--- a/drivers/media/dvb-frontends/sp2.c
+++ b/drivers/media/dvb-frontends/sp2.c
@@ -426,7 +426,6 @@ MODULE_DEVICE_TABLE(i2c, sp2_id);
 
 static struct i2c_driver sp2_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "sp2",
},
.probe  = sp2_probe,
diff --git a/drivers/media/dvb-frontends/tda10071.c 
b/drivers/media/dvb-frontends/tda10071.c
index f6dc6307d35a..2b7d6ca69945 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -1409,7 +1409,6 @@ MODULE_DEVICE_TABLE(i2c, tda10071_id_table);
 
 static struct i2c_driver tda10071_driver = {
.driver = {
-   .owner  = TH

[PATCH 6/7] [media] tuners: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/tuners/e4000.c  | 1 -
 drivers/media/tuners/fc2580.c | 1 -
 drivers/media/tuners/it913x.c | 1 -
 drivers/media/tuners/m88rs6000t.c | 1 -
 drivers/media/tuners/si2157.c | 1 -
 drivers/media/tuners/tda18212.c   | 1 -
 drivers/media/tuners/tua9001.c| 1 -
 7 files changed, 7 deletions(-)

diff --git a/drivers/media/tuners/e4000.c b/drivers/media/tuners/e4000.c
index 03538f88f488..564a000f503e 100644
--- a/drivers/media/tuners/e4000.c
+++ b/drivers/media/tuners/e4000.c
@@ -752,7 +752,6 @@ MODULE_DEVICE_TABLE(i2c, e4000_id_table);
 
 static struct i2c_driver e4000_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "e4000",
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index 12f916e53150..f4d4665de168 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -632,7 +632,6 @@ MODULE_DEVICE_TABLE(i2c, fc2580_id_table);
 
 static struct i2c_driver fc2580_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "fc2580",
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c
index a076c87eda7a..5c96da693289 100644
--- a/drivers/media/tuners/it913x.c
+++ b/drivers/media/tuners/it913x.c
@@ -463,7 +463,6 @@ MODULE_DEVICE_TABLE(i2c, it913x_id_table);
 
 static struct i2c_driver it913x_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "it913x",
},
.probe  = it913x_probe,
diff --git a/drivers/media/tuners/m88rs6000t.c 
b/drivers/media/tuners/m88rs6000t.c
index d4c13fe6e7b3..504bfbc4027a 100644
--- a/drivers/media/tuners/m88rs6000t.c
+++ b/drivers/media/tuners/m88rs6000t.c
@@ -729,7 +729,6 @@ MODULE_DEVICE_TABLE(i2c, m88rs6000t_id);
 
 static struct i2c_driver m88rs6000t_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "m88rs6000t",
},
.probe  = m88rs6000t_probe,
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index a6245ef379c4..507382160e5e 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -469,7 +469,6 @@ MODULE_DEVICE_TABLE(i2c, si2157_id_table);
 
 static struct i2c_driver si2157_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "si2157",
},
.probe  = si2157_probe,
diff --git a/drivers/media/tuners/tda18212.c b/drivers/media/tuners/tda18212.c
index d93e0667b46b..7b8068354fea 100644
--- a/drivers/media/tuners/tda18212.c
+++ b/drivers/media/tuners/tda18212.c
@@ -277,7 +277,6 @@ MODULE_DEVICE_TABLE(i2c, tda18212_id);
 
 static struct i2c_driver tda18212_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "tda18212",
},
.probe  = tda18212_probe,
diff --git a/drivers/media/tuners/tua9001.c b/drivers/media/tuners/tua9001.c
index d4f6ca0c4d92..9d70378fe2d3 100644
--- a/drivers/media/tuners/tua9001.c
+++ b/drivers/media/tuners/tua9001.c
@@ -267,7 +267,6 @@ MODULE_DEVICE_TABLE(i2c, tua9001_id_table);
 
 static struct i2c_driver tua9001_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "tua9001",
.suppress_bind_attrs = true,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/7] [media] i2c: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/i2c/adv7170.c  | 1 -
 drivers/media/i2c/adv7175.c  | 1 -
 drivers/media/i2c/adv7180.c  | 1 -
 drivers/media/i2c/adv7343.c  | 1 -
 drivers/media/i2c/adv7511.c  | 1 -
 drivers/media/i2c/adv7604.c  | 1 -
 drivers/media/i2c/adv7842.c  | 1 -
 drivers/media/i2c/bt819.c| 1 -
 drivers/media/i2c/bt856.c| 1 -
 drivers/media/i2c/bt866.c| 1 -
 drivers/media/i2c/cs5345.c   | 1 -
 drivers/media/i2c/cs53l32a.c | 1 -
 drivers/media/i2c/cx25840/cx25840-core.c | 1 -
 drivers/media/i2c/ks0127.c   | 1 -
 drivers/media/i2c/m52790.c   | 1 -
 drivers/media/i2c/msp3400-driver.c   | 1 -
 drivers/media/i2c/mt9v011.c  | 1 -
 drivers/media/i2c/ov7640.c   | 1 -
 drivers/media/i2c/ov7670.c   | 1 -
 drivers/media/i2c/saa6588.c  | 1 -
 drivers/media/i2c/saa6752hs.c| 1 -
 drivers/media/i2c/saa7110.c  | 1 -
 drivers/media/i2c/saa7115.c  | 1 -
 drivers/media/i2c/saa7127.c  | 1 -
 drivers/media/i2c/saa717x.c  | 1 -
 drivers/media/i2c/saa7185.c  | 1 -
 drivers/media/i2c/sony-btf-mpx.c | 1 -
 drivers/media/i2c/tda7432.c  | 1 -
 drivers/media/i2c/tda9840.c  | 1 -
 drivers/media/i2c/tea6415c.c | 1 -
 drivers/media/i2c/tea6420.c  | 1 -
 drivers/media/i2c/ths7303.c  | 1 -
 drivers/media/i2c/tvaudio.c  | 1 -
 drivers/media/i2c/tvp5150.c  | 1 -
 drivers/media/i2c/tw9903.c   | 1 -
 drivers/media/i2c/tw9906.c   | 1 -
 drivers/media/i2c/upd64031a.c| 1 -
 drivers/media/i2c/upd64083.c | 1 -
 drivers/media/i2c/vp27smpx.c | 1 -
 drivers/media/i2c/vpx3220.c  | 1 -
 drivers/media/i2c/wm8739.c   | 1 -
 drivers/media/i2c/wm8775.c   | 1 -
 42 files changed, 42 deletions(-)

diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c
index f0d3f5a2da46..05f1dc6c72af 100644
--- a/drivers/media/i2c/adv7170.c
+++ b/drivers/media/i2c/adv7170.c
@@ -401,7 +401,6 @@ MODULE_DEVICE_TABLE(i2c, adv7170_id);
 
 static struct i2c_driver adv7170_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "adv7170",
},
.probe  = adv7170_probe,
diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c
index 321834ba8f57..f554809a51e7 100644
--- a/drivers/media/i2c/adv7175.c
+++ b/drivers/media/i2c/adv7175.c
@@ -455,7 +455,6 @@ MODULE_DEVICE_TABLE(i2c, adv7175_id);
 
 static struct i2c_driver adv7175_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "adv7175",
},
.probe  = adv7175_probe,
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index a493c0b0b5fe..db4a09ac1cea 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -1326,7 +1326,6 @@ static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, 
adv7180_resume);
 
 static struct i2c_driver adv7180_driver = {
.driver = {
-  .owner = THIS_MODULE,
   .name = KBUILD_MODNAME,
   .pm = ADV7180_PM_OPS,
   },
diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c
index 7c50833e7d17..5f7a3bfcb905 100644
--- a/drivers/media/i2c/adv7343.c
+++ b/drivers/media/i2c/adv7343.c
@@ -529,7 +529,6 @@ MODULE_DEVICE_TABLE(of, adv7343_of_match);
 static struct i2c_driver adv7343_driver = {
.driver = {
.of_match_table = of_match_ptr(adv7343_of_match),
-   .owner  = THIS_MODULE,
.name   = "adv7343",
},
.probe  = adv7343_probe,
diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index 95bcd4026451..ef198cee8969 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -1576,7 +1576,6 @@ MODULE_DEVICE_TABLE(i2c, adv7511_id);
 
 static struct i2c_driver adv7511_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = "adv7511",
},
.probe = adv7511_probe,
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 808360fd6539..ee59f41d9951 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2985,7 +2985,6 @@ static int adv76xx_remove(struct i2c_client *client)
 
 static struct i2c_driver adv76xx_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = "adv7604",
.of_match_tab

[PATCH 5/7] [media] radio: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/radio/radio-tea5764.c | 1 -
 drivers/media/radio/saa7706h.c  | 1 -
 drivers/media/radio/tef6862.c   | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/media/radio/radio-tea5764.c 
b/drivers/media/radio/radio-tea5764.c
index cc3990111411..a1930b300c06 100644
--- a/drivers/media/radio/radio-tea5764.c
+++ b/drivers/media/radio/radio-tea5764.c
@@ -526,7 +526,6 @@ MODULE_DEVICE_TABLE(i2c, tea5764_id);
 static struct i2c_driver tea5764_i2c_driver = {
.driver = {
.name = "radio-tea5764",
-   .owner = THIS_MODULE,
},
.probe = tea5764_i2c_probe,
.remove = tea5764_i2c_remove,
diff --git a/drivers/media/radio/saa7706h.c b/drivers/media/radio/saa7706h.c
index ec805b09c608..53a5de1af9b4 100644
--- a/drivers/media/radio/saa7706h.c
+++ b/drivers/media/radio/saa7706h.c
@@ -429,7 +429,6 @@ MODULE_DEVICE_TABLE(i2c, saa7706h_id);
 
 static struct i2c_driver saa7706h_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = DRIVER_NAME,
},
.probe  = saa7706h_probe,
diff --git a/drivers/media/radio/tef6862.c b/drivers/media/radio/tef6862.c
index a9319a24c7ef..9f879f0ec0ef 100644
--- a/drivers/media/radio/tef6862.c
+++ b/drivers/media/radio/tef6862.c
@@ -195,7 +195,6 @@ MODULE_DEVICE_TABLE(i2c, tef6862_id);
 
 static struct i2c_driver tef6862_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = DRIVER_NAME,
},
.probe  = tef6862_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dmaengine: imx-sdma: Add device to device support

2015-07-09 Thread Vinod Koul
On Tue, Jul 07, 2015 at 01:24:22PM +0800, Shengjiu Wang wrote:
> > why not use set_bit(), you are modifying driver memory
> Original driver all use the __set_bit. do you think we need to change
> all the __set_bit to set_bit? And from the header file "arch/arm/include/asm
> /bitops.h", the set_bit is same as __set_bit.
New changes should be rightly done. __xxx denotes typically internal API to
a subsystem, so if they are same I would suggest to use set_bit()

> > > + /*
> > > +  * If LWML(src_maxburst) > HWML(dst_maxburst), we need
> > > +  * swap LWML and HWML of INFO(A.3.2.5.1), also need swap
> > > +  * r0(event_mask[1]) and r1(event_mask[0]).
> > > +  */
> > > + if (lwml > hwml) {
> > > + sdmac->watermark_level &= ~0xff00ff;
> > Magic number?
??

> > Okay the direction is depreciated, so can you store both source and
> > destination and use them based on direction in prepare()
> > 
> > Also I see driver is not doing this, so while at it, can you fix this is
> > current code as well
> > 
> which prepare() do you mean? sdma_prep_dma_cyclic, sdma_prep_slave_sg?
both have direction as an argument. So you need to use that

-- 
~Vinod

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 7/7] [media] Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/usb/go7007/s2250-board.c | 1 -
 drivers/media/v4l2-core/tuner-core.c   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/media/usb/go7007/s2250-board.c 
b/drivers/media/usb/go7007/s2250-board.c
index 5c2a49534d2b..1466db150d82 100644
--- a/drivers/media/usb/go7007/s2250-board.c
+++ b/drivers/media/usb/go7007/s2250-board.c
@@ -629,7 +629,6 @@ MODULE_DEVICE_TABLE(i2c, s2250_id);
 
 static struct i2c_driver s2250_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "s2250",
},
.probe  = s2250_probe,
diff --git a/drivers/media/v4l2-core/tuner-core.c 
b/drivers/media/v4l2-core/tuner-core.c
index abdcffabcb59..581e21ad6801 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -1366,7 +1366,6 @@ MODULE_DEVICE_TABLE(i2c, tuner_id);
 
 static struct i2c_driver tuner_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = "tuner",
.pm = &tuner_pm_ops,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/7] [media] platform: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/platform/s5p-tv/hdmiphy_drv.c | 1 -
 drivers/media/platform/s5p-tv/sii9234_drv.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c 
b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
index c2f2e35642f2..aae652351aa8 100644
--- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
@@ -315,7 +315,6 @@ MODULE_DEVICE_TABLE(i2c, hdmiphy_id);
 static struct i2c_driver hdmiphy_driver = {
.driver = {
.name   = "s5p-hdmiphy",
-   .owner  = THIS_MODULE,
},
.probe  = hdmiphy_probe,
.remove = hdmiphy_remove,
diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c 
b/drivers/media/platform/s5p-tv/sii9234_drv.c
index db8c17bb4aaa..8d171310af8f 100644
--- a/drivers/media/platform/s5p-tv/sii9234_drv.c
+++ b/drivers/media/platform/s5p-tv/sii9234_drv.c
@@ -397,7 +397,6 @@ MODULE_DEVICE_TABLE(i2c, sii9234_id);
 static struct i2c_driver sii9234_driver = {
.driver = {
.name   = "sii9234",
-   .owner  = THIS_MODULE,
.pm = &sii9234_pm_ops,
},
.probe  = sii9234_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof

Krzysztof Kozlowski (7):
  [media] dvb-frontends: Drop owner assignment from i2c_driver
  [media] dvb-frontends: Drop owner assignment from platform_driver
  [media] i2c: Drop owner assignment from i2c_driver
  [media] platform: Drop owner assignment from i2c_driver
  [media] radio: Drop owner assignment from i2c_driver
  [media] tuners: Drop owner assignment from i2c_driver
  [media] Drop owner assignment from i2c_driver

 drivers/media/dvb-frontends/a8293.c  | 1 -
 drivers/media/dvb-frontends/af9033.c | 1 -
 drivers/media/dvb-frontends/au8522_decoder.c | 1 -
 drivers/media/dvb-frontends/m88ds3103.c  | 1 -
 drivers/media/dvb-frontends/rtl2830.c| 1 -
 drivers/media/dvb-frontends/rtl2832.c| 1 -
 drivers/media/dvb-frontends/rtl2832_sdr.c| 1 -
 drivers/media/dvb-frontends/si2168.c | 1 -
 drivers/media/dvb-frontends/sp2.c| 1 -
 drivers/media/dvb-frontends/tda10071.c   | 1 -
 drivers/media/dvb-frontends/ts2020.c | 1 -
 drivers/media/i2c/adv7170.c  | 1 -
 drivers/media/i2c/adv7175.c  | 1 -
 drivers/media/i2c/adv7180.c  | 1 -
 drivers/media/i2c/adv7343.c  | 1 -
 drivers/media/i2c/adv7511.c  | 1 -
 drivers/media/i2c/adv7604.c  | 1 -
 drivers/media/i2c/adv7842.c  | 1 -
 drivers/media/i2c/bt819.c| 1 -
 drivers/media/i2c/bt856.c| 1 -
 drivers/media/i2c/bt866.c| 1 -
 drivers/media/i2c/cs5345.c   | 1 -
 drivers/media/i2c/cs53l32a.c | 1 -
 drivers/media/i2c/cx25840/cx25840-core.c | 1 -
 drivers/media/i2c/ks0127.c   | 1 -
 drivers/media/i2c/m52790.c   | 1 -
 drivers/media/i2c/msp3400-driver.c   | 1 -
 drivers/media/i2c/mt9v011.c  | 1 -
 drivers/media/i2c/ov7640.c   | 1 -
 drivers/media/i2c/ov7670.c   | 1 -
 drivers/media/i2c/saa6588.c  | 1 -
 drivers/media/i2c/saa6752hs.c| 1 -
 drivers/media/i2c/saa7110.c  | 1 -
 drivers/media/i2c/saa7115.c  | 1 -
 drivers/media/i2c/saa7127.c  | 1 -
 drivers/media/i2c/saa717x.c  | 1 -
 drivers/media/i2c/saa7185.c  | 1 -
 drivers/media/i2c/sony-btf-mpx.c | 1 -
 drivers/media/i2c/tda7432.c  | 1 -
 drivers/media/i2c/tda9840.c  | 1 -
 drivers/media/i2c/tea6415c.c | 1 -
 drivers/media/i2c/tea6420.c  | 1 -
 drivers/media/i2c/ths7303.c  | 1 -
 drivers/media/i2c/tvaudio.c  | 1 -
 drivers/media/i2c/tvp5150.c  | 1 -
 drivers/media/i2c/tw9903.c   | 1 -
 drivers/media/i2c/tw9906.c   | 1 -
 drivers/media/i2c/upd64031a.c| 1 -
 drivers/media/i2c/upd64083.c | 1 -
 drivers/media/i2c/vp27smpx.c | 1 -
 drivers/media/i2c/vpx3220.c  | 1 -
 drivers/media/i2c/wm8739.c   | 1 -
 drivers/media/i2c/wm8775.c   | 1 -
 drivers/media/platform/s5p-tv/hdmiphy_drv.c  | 1 -
 drivers/media/platform/s5p-tv/sii9234_drv.c  | 1 -
 drivers/media/radio/radio-tea5764.c  | 1 -
 drivers/media/radio/saa7706h.c   | 1 -
 drivers/media/radio/tef6862.c| 1 -
 drivers/media/tuners/e4000.c | 1 -
 drivers/media/tuners/fc2580.c| 1 -
 drivers/media/tuners/it913x.c| 1 -
 drivers/media/tuners/m88rs6000t.c| 1 -
 drivers/media/tuners/si2157.c| 1 -
 drivers/media/tuners/tda18212.c  | 1 -
 drivers/media/tuners/tua9001.c   | 1 -
 drivers/media/usb/go7007/s2250-board.c   | 1 -
 drivers/media/v4l2-core/tuner-core.c | 1 -
 67 files changed, 67 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/7] [media] dvb-frontends: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/dvb-frontends/rtl2832_sdr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c 
b/drivers/media/dvb-frontends/rtl2832_sdr.c
index 7edb885ae9c8..d5b994f17612 100644
--- a/drivers/media/dvb-frontends/rtl2832_sdr.c
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.c
@@ -1538,7 +1538,6 @@ static int rtl2832_sdr_remove(struct platform_device 
*pdev)
 static struct platform_driver rtl2832_sdr_driver = {
.driver = {
.name   = "rtl2832_sdr",
-   .owner  = THIS_MODULE,
},
.probe  = rtl2832_sdr_probe,
.remove = rtl2832_sdr_remove,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] HID: hid-sony: Navigator Axis for L1 button

2015-07-09 Thread Simon Wood
Patch HID report descriptor to add joystick axis for the L1 button (previously 
missing).

Signed-off-by: Simon Wood 
---
 drivers/hid/hid-sony.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index ed2f008..69586b3 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -296,7 +296,14 @@ static __u8 navigation_rdesc[] = {
0x09, 0x01, /*  Usage (Pointer),*/
0x81, 0x02, /*  Input (Variable),   */
0x06, 0x00, 0xFF,   /*  Usage Page (FF00h), */
-   0x95, 0x20, /*  Report Count (26),  */
+   0x95, 0x01, /*  Report Count (1),   */
+   0x81, 0x02, /*  Input (Variable),   */
+   0x05, 0x01, /*  Usage Page (Desktop),   */
+   0x95, 0x01, /*  Report Count (1),   */
+   0x09, 0x01, /*  Usage (Pointer),*/
+   0x81, 0x02, /*  Input (Variable),   */
+   0x06, 0x00, 0xFF,   /*  Usage Page (FF00h), */
+   0x95, 0x1E, /*  Report Count (24),  */
0x81, 0x02, /*  Input (Variable),   */
0x75, 0x08, /*  Report Size (8),*/
0x95, 0x30, /*  Report Count (48),  */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Query: Clock driver requests mailbox channel

2015-07-09 Thread Leo Yan
On Wed, Jul 08, 2015 at 09:54:29AM -0700, Michael Turquette wrote:
> Cc'ing linux-clk and Stephen Boyd
> 
> Quoting Leo Yan (2015-07-07 07:04:25)
> > On Tue, Jul 07, 2015 at 10:54:55AM +0530, Jassi Brar wrote:
> > > On Mon, Jul 6, 2015 at 5:03 PM, Leo Yan  wrote:
> > > > Hi all,
> > > >
> > > > i'm working with one clock driver, which will invoke mailbox API to
> > > > request the mailbox channel and send message.
> > > >
> > > > Usually clock driver will init with devicetree, below is the example:
> > > > CLK_OF_DECLARE(hi6220_clk_power, "hisilicon,hi6220-clock-power",
> > > > hi6220_clk_power_init);
> > > >
> > > > Clock init function it will pass the pointer of struct device_node
> > > > but not the pointer of struct device. So finally it's difficult to
> > > > invoke mailbox API *mbox_request_channel()*, due it need use the
> > > > struct device to search DT's property "mboxes".
> > > >
> > > > I want to find which is the best way to resolve this issue, so do you
> > > > suggest clock driver to manually register one device? Or can we add
> > > > one more API to request the mailbox channel directly with device_node?
> > > >
> > > IIUC, such clocks (that require platform resources) should be
> > > populated from the platform_device's probe()?
> > 
> > Thanks for response, Jassi. If we use general platform_device's probe()
> > function, then we can smoothly to get device poiner.
> > 
> > But if we use the method with CLK_OF_DECLARE, then i tried to get device
> > pointer with the function of_find_device_by_node(), it will return the
> > device pointer is NULL. But this is the common case in many clock drivers.
> 
> Using platform_device is the right approach. Stephen has been trying to
> encourage use of that and discourage use of CLK_OF_DECLARE where
> possible.
> 
> If your clock driver needs to register some early clocks then perhaps
> those can be handled separately with CLK_OF_DECLARE and the rest can be
> managed through a proper platform_driver?

> > So i just wander if can provide another mailbox API for this case,
> > which will only need to pass device node pointer?
> 
> I can't comment on the mailbox API question, but I think the Right Thing
> is to use a platform_driver for your clock driver, which would solve
> your particular issue. This is something we are encouraging in Clock
> Land ;)

Got it and thanks for clarification. i will change to use platform_driver.
Looks like i can refer some examples in the folder drivers/clk/qcom. ;)

Thanks,
Leo Yan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] lib/bitmap.c: add some check to correct the parse result

2015-07-09 Thread Pan Xinhui
hi, Andrew
thanks for you kind reply :)

On 2015年07月10日 06:57, Andrew Morton wrote:
> On Sat, 27 Jun 2015 14:36:18 +0800 Pan Xinhui  wrote:
> 
>> Sometimes the input from user may cause an unexpected result.
>>
>> for example, echo "1-3," > /proc/irq//smp_affinity_list.
>> The correct result should be 1-3, however we got 0-4.
>>
>> To avoid this issue, we check if there is a ready digit.
>> If no valid digit is set, we just continue to the next parse.
>>
>> Signed-off-by: Pan Xinhui 
>> ---
>>   lib/bitmap.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/lib/bitmap.c b/lib/bitmap.c
>> index 64c0926..3c489c1 100644
>> --- a/lib/bitmap.c
>> +++ b/lib/bitmap.c
>> @@ -561,6 +561,8 @@ static int __bitmap_parselist(const char *buf, unsigned 
>> int buflen,
>>  return -EINVAL;
>>  if (b >= nmaskbits)
>>  return -ERANGE;
>> +if (unlikely(exp_digit))
>> +continue;
>>  while (a <= b) {
>>  set_bit(a, maskp);
>>  a++;
> 
> This bug might have been fixed by 2528a8b8f457d7 ("__bitmap_parselist:
> fix bug in empty string handling"), below.  Please check?
> 
> 
Yes, I noticed it after I sent this patch out. Sorry for not syncing the 
upstream codes.
I am very happy that you reviewed my patch :)

I send out other three patches to make current codes stronger :)
they are
[PATCH 1/3] lib/bitmap.c: correct a code style and do some optimization in 
__bitmap_parse
[PATCH 2/3] lib/bitmap.c: fix a special string handling bug in  
__bitmap_parselist
[PATCH 3/3] lib/bitmap.c: bitmap_parselist can accept string with  whitespaces 
on head or tail
Of course I have verified/test them :)
They have minor codes change.

thanks
xinhui

> commit 2528a8b8f457d7432552d0e2b6f0f4046bb702f4
> Author: Chris Metcalf 
> AuthorDate: Thu Jun 25 15:02:08 2015 -0700
> Commit: Linus Torvalds 
> CommitDate: Thu Jun 25 17:00:40 2015 -0700
> 
> __bitmap_parselist: fix bug in empty string handling
> 
> bitmap_parselist("", &mask, nmaskbits) will erroneously set bit zero in
> the mask.  The same bug is visible in cpumask_parselist() since it is
> layered on top of the bitmask code, e.g.  if you boot with "isolcpus=",
> you will actually end up with cpu zero isolated.
> 
> The bug was introduced in commit 4b060420a596 ("bitmap, irq: add
> smp_affinity_list interface to /proc/irq") when bitmap_parselist() was
> generalized to support userspace as well as kernelspace.
> 
> Fixes: 4b060420a596 ("bitmap, irq: add smp_affinity_list interface to 
> /proc/irq")
> Signed-off-by: Chris Metcalf 
> Cc: Rasmus Villemoes 
> Signed-off-by: Andrew Morton 
> Signed-off-by: Linus Torvalds 
> 
> diff --git a/lib/bitmap.c b/lib/bitmap.c
> index 64c0926..40162f8 100644
> --- a/lib/bitmap.c
> +++ b/lib/bitmap.c
> @@ -506,12 +506,12 @@ static int __bitmap_parselist(const char *buf, unsigned 
> int buflen,
>   unsigned a, b;
>   int c, old_c, totaldigits;
>   const char __user __force *ubuf = (const char __user __force *)buf;
> - int exp_digit, in_range;
> + int at_start, in_range;
>  
>   totaldigits = c = 0;
>   bitmap_zero(maskp, nmaskbits);
>   do {
> - exp_digit = 1;
> + at_start = 1;
>   in_range = 0;
>   a = b = 0;
>  
> @@ -540,11 +540,10 @@ static int __bitmap_parselist(const char *buf, unsigned 
> int buflen,
>   break;
>  
>   if (c == '-') {
> - if (exp_digit || in_range)
> + if (at_start || in_range)
>   return -EINVAL;
>   b = 0;
>   in_range = 1;
> - exp_digit = 1;
>   continue;
>   }
>  
> @@ -554,16 +553,18 @@ static int __bitmap_parselist(const char *buf, unsigned 
> int buflen,
>   b = b * 10 + (c - '0');
>   if (!in_range)
>   a = b;
> - exp_digit = 0;
> + at_start = 0;
>   totaldigits++;
>   }
>   if (!(a <= b))
>   return -EINVAL;
>   if (b >= nmaskbits)
>   return -ERANGE;
> - while (a <= b) {
> - set_bit(a, maskp);
> - a++;
> + if (!at_start) {
> + while (a <= b) {
> + set_bit(a, maskp);
> + a++;
> + }
>   }
>   } while (buflen && c == ',');
>   return 0;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  

[PATCH v2 6/6] ARM: dts: mt6580: enable basic SMP bringup for MT6580

2015-07-09 Thread Scott Shu
Add arch timer node to enable arch-timer support. MT6580 firmware
doesn't correctly setup arch-timer frequency and CNTVOFF, add
properties to workaround this.

This set cpu enable-method to enable SMP.

Signed-off-by: Scott Shu 
---
 arch/arm/boot/dts/mt6580.dtsi | 20 
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/mt6580.dtsi b/arch/arm/boot/dts/mt6580.dtsi
index 4a9df6a..ef577bd 100644
--- a/arch/arm/boot/dts/mt6580.dtsi
+++ b/arch/arm/boot/dts/mt6580.dtsi
@@ -25,26 +25,31 @@
cpus {
#address-cells = <1>;
#size-cells = <0>;
+   enable-method = "mediatek,mt6580-smp";
 
cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0x0>;
+   clock-frequency = <17>;
};
cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0x1>;
+   clock-frequency = <17>;
};
cpu@2 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0x2>;
+   clock-frequency = <17>;
};
cpu@3 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0x3>;
+   clock-frequency = <17>;
};
 
};
@@ -74,6 +79,21 @@
};
};
 
+   timer {
+   compatible = "arm,armv7-timer";
+   interrupt-parent = <&gic>;
+   interrupts = ,
+   ,
+   ,
+   ;
+   clock-frequency = <1300>;
+   arm,cpu-registers-not-fw-configured;
+   };
+
scpsys: scpsys@10006000 {
compatible = "mediatek,mt6580-scpsys";
reg = <0x10006000 0x1000>;
-- 
1.8.1.1.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 1/6] Document: bindings: DT: Add SMP enable method for MT6580 SoC platform

2015-07-09 Thread Scott Shu
For MT6580 SoC platform, the secondary cores are in powered off state
as default, so compared with MT65xx series SoC, one new enable method
is needed. This method using the SPM (System Power Manager) inside
the SCPSYS to control the CPU power.

Signed-off-by: Scott Shu 
---
 Documentation/devicetree/bindings/arm/cpus.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/cpus.txt 
b/Documentation/devicetree/bindings/arm/cpus.txt
index be35054..eaee089 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -195,6 +195,7 @@ nodes to be present and contain the properties described 
below.
"marvell,armada-380-smp"
"marvell,armada-390-smp"
"marvell,armada-xp-smp"
+   "mediatek,mt6580-smp"
"mediatek,mt65xx-smp"
"mediatek,mt81xx-tz-smp"
"qcom,gcc-msm8660"
-- 
1.8.1.1.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 0/6] This series adds SMP support for the MediaTek MT6580.

2015-07-09 Thread Scott Shu
This patchset adds support SMP on MediaTek MT6580 Cortex-A7 quad-core SoC.

This is based on v4.1-rc1 and following patch series:
(1) Yingjoe Chen's "Add SMP bringup support for mt65xx socs" [1]
(2) Mars Cheng's "Add mt6580 basic chip support" [2]
(3) Sascha Hauer's "Mediatek SCPSYS power domain support" [3]

The secondary cores are power off as default on MT6580, this change adds
a new enable-method to turn on power to the cores during booting process.

The System Power Manager (SPM) inside the SCPSYS is for the CPU MTCMOS
power domain control. Please check [3] for more information about SCPSYS.

[1] https://lkml.org/lkml/2015/5/16/33
[2] https://lkml.org/lkml/2015/7/7/122
[3] https://lkml.org/lkml/2015/6/9/172

Change in v2:
1. Rebase to 4.2-rc1
2. Fix using usleep() in atomic context
3. Put a timeout in cpu power on/off sequence
4. Fix some coding style

Scott Shu (6):
  Document: bindings: DT: Add SMP enable method for MT6580 SoC
platform
  soc: Mediatek: Add SCPSYS CPU power domain driver
  ARM: mediatek: add smp bringup code for MT6580
  ARM: Mediatek: enable GPT6 on boot up to make arch timer working
for MT6580
  ARM: dts: mt6580: Add device nodes to the MT6580 dtsi file
  ARM: dts: mt6580: enable basic SMP bringup for MT6580

 Documentation/devicetree/bindings/arm/cpus.txt |   1 +
 arch/arm/boot/dts/mt6580.dtsi  |  25 +++
 arch/arm/mach-mediatek/Makefile|   2 +-
 arch/arm/mach-mediatek/generic.h   |  23 +++
 arch/arm/mach-mediatek/hotplug.c   | 267 +
 arch/arm/mach-mediatek/mediatek.c  |   4 +-
 arch/arm/mach-mediatek/platsmp.c   | 139 -
 7 files changed, 458 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/mach-mediatek/generic.h
 create mode 100644 arch/arm/mach-mediatek/hotplug.c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 5/6] ARM: dts: mt6580: Add device nodes to the MT6580 dtsi file

2015-07-09 Thread Scott Shu
This adds the SCPSYS device node to the MT6580 dtsi file.

Signed-off-by: Scott Shu 
---
 arch/arm/boot/dts/mt6580.dtsi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/mt6580.dtsi b/arch/arm/boot/dts/mt6580.dtsi
index 09852cd..4a9df6a 100644
--- a/arch/arm/boot/dts/mt6580.dtsi
+++ b/arch/arm/boot/dts/mt6580.dtsi
@@ -74,6 +74,11 @@
};
};
 
+   scpsys: scpsys@10006000 {
+   compatible = "mediatek,mt6580-scpsys";
+   reg = <0x10006000 0x1000>;
+   };
+
timer: timer@10008000 {
compatible = "mediatek,mt6580-timer",
 "mediatek,mt6577-timer";
-- 
1.8.1.1.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 3/6] ARM: mediatek: add smp bringup code for MT6580

2015-07-09 Thread Scott Shu
Add support for cpu enable-method "mediatek,mt6580-smp" for booting
secondary CPUs on MT6580.

Signed-off-by: Scott Shu 
---
 arch/arm/mach-mediatek/platsmp.c | 139 ++-
 1 file changed, 138 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index 12fefb3..7f5a5cfb 100644
--- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c
@@ -13,7 +13,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
  */
 #include 
 #include 
@@ -21,10 +20,15 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include "generic.h"
 
 #define MTK_MAX_CPU8
 #define MTK_SMP_REG_SIZE   0x1000
 
+static DEFINE_SPINLOCK(boot_lock);
+
 struct mtk_smp_boot_info {
unsigned long smp_base;
unsigned int jump_reg;
@@ -57,6 +61,128 @@ static const struct of_device_id mtk_smp_boot_infos[] 
__initconst = {
 static void __iomem *mtk_smp_base;
 static const struct mtk_smp_boot_info *mtk_smp_info;
 
+#ifdef CONFIG_HOTPLUG_CPU
+static int mt6580_cpu_kill(unsigned cpu)
+{
+   int ret;
+
+   ret = spm_cpu_mtcmos_off(cpu, 1);
+   if (ret < 0)
+   return 0;
+
+   return 1;
+}
+
+static void mt6580_cpu_die(unsigned int cpu)
+{
+   for (;;)
+   cpu_do_idle();
+}
+#endif
+
+static void write_pen_release(int val)
+{
+   pen_release = val;
+   /* Make sure this is visible to other CPUs */
+   smp_wmb();
+   sync_cache_w(&pen_release);
+}
+
+/*
+ * Refer common "pen" secondary release method
+ */
+static int mt6580_boot_secondary(unsigned int cpu, struct task_struct *idle)
+{
+   unsigned long timeout;
+   int ret;
+
+   /*
+* Set synchronisation state between this boot processor
+* and the secondary one
+*/
+   spin_lock(&boot_lock);
+
+   /*
+* The secondary processor is waiting to be released from
+* the holding pen - release it, then wait for it to flag
+* that it has been released by resetting pen_release.
+*
+* Note that "pen_release" is the hardware CPU ID, whereas
+* "cpu" is Linux's internal ID.
+*/
+   write_pen_release(cpu);
+
+   /*
+* CPU power on control by SPM
+*/
+   ret = spm_cpu_mtcmos_on(cpu);
+   if (ret < 0) {
+   spin_unlock(&boot_lock);
+   return -ENOSYS;
+   }
+
+   timeout = jiffies + (1 * HZ);
+   while (time_before(jiffies, timeout)) {
+   /* Read barrier */
+   smp_rmb();
+
+   if (pen_release == -1)
+   break;
+
+   udelay(10);
+   }
+
+   /*
+* Now the secondary core is starting up let it run its
+* calibrations, then wait for it to finish
+*/
+   spin_unlock(&boot_lock);
+
+   return (pen_release != -1 ? -ENOSYS : 0);
+}
+
+static void mt6580_secondary_init(unsigned int cpu)
+{
+   /*
+* Let the primary processor know we're out of the
+* pen, then head off into the C entry point
+*/
+   write_pen_release(-1);
+
+   /*
+* Synchronise with the boot thread.
+*/
+   spin_lock(&boot_lock);
+   spin_unlock(&boot_lock);
+}
+
+#define MT6580_INFRACFG_AO 0x10001000
+#define SW_ROM_PD  BIT(31)
+
+static void __init mt6580_smp_prepare_cpus(unsigned int max_cpus)
+{
+   static void __iomem *infracfg_ao_base;
+
+   infracfg_ao_base = ioremap(MT6580_INFRACFG_AO, 0x1000);
+
+   if (!infracfg_ao_base)
+   pr_err("%s: Unable to map I/O memory\n", __func__);
+
+   /* Enable bootrom power down mode */
+   writel_relaxed(readl(infracfg_ao_base + 0x804) | SW_ROM_PD,
+  infracfg_ao_base + 0x804);
+
+   /* Write the address of slave startup into boot address
+  register for bootrom power down mode */
+   writel_relaxed(virt_to_phys(secondary_startup_arm),
+  infracfg_ao_base + 0x800);
+
+   iounmap(infracfg_ao_base);
+
+   /* Initial spm cpu mtcmos memory map */
+   spm_cpu_mtcmos_init();
+}
+
 static int mtk_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
if (!mtk_smp_base)
@@ -143,3 +269,14 @@ static struct smp_operations mt65xx_smp_ops __initdata = {
.smp_boot_secondary = mtk_boot_secondary,
 };
 CPU_METHOD_OF_DECLARE(mt65xx_smp, "mediatek,mt65xx-smp", &mt65xx_smp_ops);
+
+static struct smp_operations mt6580_smp_ops __initdata = {
+   .smp_prepare_cpus = mt6580_smp_prepare_cpus,
+   .smp_secondary_init = mt6580_secondary_init,
+   .smp_boot_secondary = mt6580_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+   .cpu_kill = mt6580_cpu_kill,
+   .cpu_die = mt6580_cpu_die,
+#endif
+};
+CPU_METHOD_OF_DECLARE(mt6580_smp

[PATCH v2 4/6] ARM: Mediatek: enable GPT6 on boot up to make arch timer working for MT6580

2015-07-09 Thread Scott Shu
We enable GTP6 which ungates the arch timer clock.

Signed-off-by: Scott Shu 
---
 arch/arm/mach-mediatek/mediatek.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-mediatek/mediatek.c 
b/arch/arm/mach-mediatek/mediatek.c
index 6b38d67..469d332 100644
--- a/arch/arm/mach-mediatek/mediatek.c
+++ b/arch/arm/mach-mediatek/mediatek.c
@@ -28,7 +28,8 @@ static void __init mediatek_timer_init(void)
 {
void __iomem *gpt_base = 0;
 
-   if (of_machine_is_compatible("mediatek,mt6589") ||
+   if (of_machine_is_compatible("mediatek,mt6580") ||
+   of_machine_is_compatible("mediatek,mt6589") ||
of_machine_is_compatible("mediatek,mt8135") ||
of_machine_is_compatible("mediatek,mt8127")) {
/* turn on GPT6 which ungates arch timer clocks */
@@ -46,6 +47,7 @@ static void __init mediatek_timer_init(void)
 };
 
 static const char * const mediatek_board_dt_compat[] = {
+   "mediatek,mt6580",
"mediatek,mt6589",
"mediatek,mt6592",
"mediatek,mt8127",
-- 
1.8.1.1.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/6] soc: Mediatek: Add SCPSYS CPU power domain driver

2015-07-09 Thread Scott Shu
This adds a CPU power domain driver for the Mediatek SCPSYS unit on
MT6580.

Signed-off-by: Scott Shu 
---
 arch/arm/mach-mediatek/Makefile  |   2 +-
 arch/arm/mach-mediatek/generic.h |  23 
 arch/arm/mach-mediatek/hotplug.c | 267 +++
 3 files changed, 291 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-mediatek/generic.h
 create mode 100644 arch/arm/mach-mediatek/hotplug.c

diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile
index 2116460..b2e4ef5 100644
--- a/arch/arm/mach-mediatek/Makefile
+++ b/arch/arm/mach-mediatek/Makefile
@@ -1,4 +1,4 @@
 ifeq ($(CONFIG_SMP),y)
-obj-$(CONFIG_ARCH_MEDIATEK) += platsmp.o
+obj-$(CONFIG_ARCH_MEDIATEK) += platsmp.o hotplug.o
 endif
 obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o
diff --git a/arch/arm/mach-mediatek/generic.h b/arch/arm/mach-mediatek/generic.h
new file mode 100644
index 000..376f183
--- /dev/null
+++ b/arch/arm/mach-mediatek/generic.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2015 Mediatek Inc.
+ * Author: Scott Shu 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#ifndef __MACH_GENERIC_H
+#define __MACH_GENERIC_H
+
+#include 
+
+int spm_cpu_mtcmos_init(void);
+int spm_cpu_mtcmos_on(int cpu);
+int spm_cpu_mtcmos_off(int cpu, bool wfi);
+
+#endif
diff --git a/arch/arm/mach-mediatek/hotplug.c b/arch/arm/mach-mediatek/hotplug.c
new file mode 100644
index 000..bd97f2e
--- /dev/null
+++ b/arch/arm/mach-mediatek/hotplug.c
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2015 Mediatek Inc.
+ * Author: Scott Shu 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* SCPSYS registers */
+#define SPM_POWERON_CONFIG_SET 0x
+
+#define SPM_CA7_CPU0_PWR_CON   0x0200
+#define SPM_CA7_CPU1_PWR_CON   0x0218
+#define SPM_CA7_CPU2_PWR_CON   0x021c
+#define SPM_CA7_CPU3_PWR_CON   0x0220
+
+#define SPM_CA7_CPU0_L1_PDN0x025c
+#define SPM_CA7_CPU1_L1_PDN0x0264
+#define SPM_CA7_CPU2_L1_PDN0x026c
+#define SPM_CA7_CPU3_L1_PDN0x0274
+
+#define SPM_PWR_STATUS 0x060c
+#define SPM_PWR_STATUS_2ND 0x0610
+#define SPM_SLEEP_TIMER_STA0x0720
+
+/* bit definition in SPM_CA7_CPUx_PWR_CON */
+#define SRAM_ISOINT_B  BIT(6)
+#define SRAM_CKISO BIT(5)
+#define PWR_CLK_DISBIT(4)
+#define PWR_ON_2ND BIT(3)
+#define PWR_ON BIT(2)
+#define PWR_ISOBIT(1)
+#define PWR_RST_B  BIT(0)
+
+/* bit definition in SPM_CA7_CPUx_L1_PDN */
+#define L1_PDN_ACK BIT(8)
+#define L1_PDN BIT(0)
+
+#define MT6580_MAX_CPUS4
+
+static DEFINE_SPINLOCK(spm_cpu_lock);
+
+void __iomem *spm_cpu_base;
+
+u32 spm_cpu_pwr_con[MT6580_MAX_CPUS] = {
+   SPM_CA7_CPU0_PWR_CON,
+   SPM_CA7_CPU1_PWR_CON,
+   SPM_CA7_CPU2_PWR_CON,
+   SPM_CA7_CPU3_PWR_CON,
+};
+
+u32 spm_cpu_l1_pdn[MT6580_MAX_CPUS] = {
+   SPM_CA7_CPU0_L1_PDN,
+   SPM_CA7_CPU1_L1_PDN,
+   SPM_CA7_CPU2_L1_PDN,
+   SPM_CA7_CPU3_L1_PDN,
+};
+
+#define SPM_REGWR_EN   BIT(0)
+#define SPM_PROJECT_CODE   0x0B16
+
+int spm_cpu_mtcmos_on(int cpu)
+{
+   unsigned long flags;
+   static u32 spmcpu_pwr_con, spmcpu_l1_pdn;
+   unsigned int temp;
+   int timeout = 10;
+   int ret = -ENOSYS;
+
+   temp = (SPM_PROJECT_CODE << 16) | SPM_REGWR_EN;
+   writel_relaxed(temp, spm_cpu_base + SPM_POWERON_CONFIG_SET);
+
+   spmcpu_pwr_con = spm_cpu_pwr_con[cpu];
+   spmcpu_l1_pdn = spm_cpu_l1_pdn[cpu];
+
+   spin_lock_irqsave(&spm_cpu_lock, flags);
+
+   /* Set PWR_ON */
+   temp = readl_relaxed(spm_cpu_base + spmcpu_pwr_con);
+   temp |= PWR_ON;
+   writel_relaxed(temp, spm_cpu_base + spmcpu_pwr_con);
+
+   /* Wait for charging core power */
+   udelay(1);
+
+   /* Set PWR_ON_2ND */
+   temp = readl_relaxed(spm_cpu_base + spmcpu_pwr_con);
+   temp |= PWR_ON_2ND;
+   writel_relaxed(temp, spm_cpu_base + spmcpu_pwr_con);
+
+   /* Wait for the power-ack

Re: [PATCH 1/2] power: reset: at91: add sama5d3 reset function

2015-07-09 Thread Alexandre Belloni
Hi,

On 09/07/2015 at 18:15:46 +0800, Josh Wu wrote :
> As since sama5d3, to reset the chip, we don't need to shutdown the ddr
> controller.
> 
> So add a new compatible string and new restart function for sama5d3 and
> later chips. As we don't use sama5d3 ddr controller, so remove it as
> well.
> 
> Signed-off-by: Josh Wu 
> Acked-by: Nicolas Ferre 
> ---
> 
>  drivers/power/reset/at91-reset.c | 30 +-
>  1 file changed, 21 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/power/reset/at91-reset.c 
> b/drivers/power/reset/at91-reset.c
> index 36dc52f..8944b63 100644
> --- a/drivers/power/reset/at91-reset.c
> +++ b/drivers/power/reset/at91-reset.c
> @@ -123,6 +123,14 @@ static int at91sam9g45_restart(struct notifier_block 
> *this, unsigned long mode,
>   return NOTIFY_DONE;
>  }
>  
> +static int sama5d3_restart(struct notifier_block *this, unsigned long mode,
> + void *cmd)

Please align that line properly.

> +{
> + writel(cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | 
> AT91_RSTC_PROCRST),
> + at91_rstc_base);

That one too.

> + return NOTIFY_DONE;
> +}
> +
>  static void __init at91_reset_status(struct platform_device *pdev)
>  {
>   u32 reg = readl(at91_rstc_base + AT91_RSTC_SR);
> @@ -155,13 +163,13 @@ static void __init at91_reset_status(struct 
> platform_device *pdev)
>  static const struct of_device_id at91_ramc_of_match[] = {
>   { .compatible = "atmel,at91sam9260-sdramc", },
>   { .compatible = "atmel,at91sam9g45-ddramc", },
> - { .compatible = "atmel,sama5d3-ddramc", },
>   { /* sentinel */ }
>  };
>  
>  static const struct of_device_id at91_reset_of_match[] = {
>   { .compatible = "atmel,at91sam9260-rstc", .data = at91sam9260_restart },
>   { .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart },
> + { .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart },
>   { /* sentinel */ }
>  };
>  
> @@ -181,17 +189,21 @@ static int at91_reset_of_probe(struct platform_device 
> *pdev)
>   return -ENODEV;
>   }
>  
> - for_each_matching_node(np, at91_ramc_of_match) {
> - at91_ramc_base[idx] = of_iomap(np, 0);
> - if (!at91_ramc_base[idx]) {
> - dev_err(&pdev->dev, "Could not map ram controller 
> address\n");
> - return -ENODEV;
> + match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
> + at91_restart_nb.notifier_call = match->data;
> +
> + if (match->data != sama5d3_restart) {

This doesn't scale well. I would create a structure with a pointer to
the restart function and a boolean or a bitfield to store whether the
workaround is needed. Use that structure in your match data. Then, you
won't need to reorder anything.

> + /* we need to shutdown the ddr controller, so get ramc base */
> + for_each_matching_node(np, at91_ramc_of_match) {
> + at91_ramc_base[idx] = of_iomap(np, 0);
> + if (!at91_ramc_base[idx]) {
> + dev_err(&pdev->dev, "Could not map ram 
> controller address\n");
> + return -ENODEV;
> + }
> + idx++;
>   }
> - idx++;
>   }
>  
> - match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
> - at91_restart_nb.notifier_call = match->data;
>   return register_restart_handler(&at91_restart_nb);
>  }

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mailbox: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/mailbox/bcm2835-mailbox.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mailbox/bcm2835-mailbox.c 
b/drivers/mailbox/bcm2835-mailbox.c
index 0b47dd42f3bd..cfb4b4496dd9 100644
--- a/drivers/mailbox/bcm2835-mailbox.c
+++ b/drivers/mailbox/bcm2835-mailbox.c
@@ -204,7 +204,6 @@ MODULE_DEVICE_TABLE(of, bcm2835_mbox_of_match);
 static struct platform_driver bcm2835_mbox_driver = {
.driver = {
.name = "bcm2835-mbox",
-   .owner = THIS_MODULE,
.of_match_table = bcm2835_mbox_of_match,
},
.probe  = bcm2835_mbox_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] leds: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/leds/leds-lm3530.c  | 1 -
 drivers/leds/leds-lm355x.c  | 1 -
 drivers/leds/leds-lm3642.c  | 1 -
 drivers/leds/leds-pca955x.c | 1 -
 drivers/leds/leds-pca963x.c | 1 -
 drivers/leds/leds-tca6507.c | 1 -
 6 files changed, 6 deletions(-)

diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c
index 91325de3cd33..b38430cb10ad 100644
--- a/drivers/leds/leds-lm3530.c
+++ b/drivers/leds/leds-lm3530.c
@@ -492,7 +492,6 @@ static struct i2c_driver lm3530_i2c_driver = {
.id_table = lm3530_id,
.driver = {
.name = LM3530_NAME,
-   .owner = THIS_MODULE,
},
 };
 
diff --git a/drivers/leds/leds-lm355x.c b/drivers/leds/leds-lm355x.c
index f5112cb2d991..48872997d6b4 100644
--- a/drivers/leds/leds-lm355x.c
+++ b/drivers/leds/leds-lm355x.c
@@ -555,7 +555,6 @@ MODULE_DEVICE_TABLE(i2c, lm355x_id);
 static struct i2c_driver lm355x_i2c_driver = {
.driver = {
   .name = LM355x_NAME,
-  .owner = THIS_MODULE,
   .pm = NULL,
   },
.probe = lm355x_probe,
diff --git a/drivers/leds/leds-lm3642.c b/drivers/leds/leds-lm3642.c
index d3dec0132769..02ebe342f5af 100644
--- a/drivers/leds/leds-lm3642.c
+++ b/drivers/leds/leds-lm3642.c
@@ -446,7 +446,6 @@ MODULE_DEVICE_TABLE(i2c, lm3642_id);
 static struct i2c_driver lm3642_i2c_driver = {
.driver = {
   .name = LM3642_NAME,
-  .owner = THIS_MODULE,
   .pm = NULL,
   },
.probe = lm3642_probe,
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index c3a08b60535b..b775e1efecd3 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -379,7 +379,6 @@ static int pca955x_remove(struct i2c_client *client)
 static struct i2c_driver pca955x_driver = {
.driver = {
.name   = "leds-pca955x",
-   .owner  = THIS_MODULE,
},
.probe  = pca955x_probe,
.remove = pca955x_remove,
diff --git a/drivers/leds/leds-pca963x.c b/drivers/leds/leds-pca963x.c
index bee3e1ab27fd..3f63a1bfdc4f 100644
--- a/drivers/leds/leds-pca963x.c
+++ b/drivers/leds/leds-pca963x.c
@@ -458,7 +458,6 @@ static int pca963x_remove(struct i2c_client *client)
 static struct i2c_driver pca963x_driver = {
.driver = {
.name   = "leds-pca963x",
-   .owner  = THIS_MODULE,
.of_match_table = of_match_ptr(of_pca963x_match),
},
.probe  = pca963x_probe,
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 20fa8e77f186..c1f910981781 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -830,7 +830,6 @@ static int tca6507_remove(struct i2c_client *client)
 static struct i2c_driver tca6507_driver = {
.driver   = {
.name= "leds-tca6507",
-   .owner   = THIS_MODULE,
.of_match_table = of_match_ptr(of_tca6507_leds_match),
},
.probe= tca6507_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] zsmalloc: consider ZS_ALMOST_FULL as migrate source

2015-07-09 Thread Minchan Kim
On Fri, Jul 10, 2015 at 02:46:54PM +0900, Sergey Senozhatsky wrote:
> On (07/10/15 14:31), Minchan Kim wrote:
> > There is no reason to prevent select ZS_ALMOST_FULL as migration
> > source if we cannot find source from ZS_ALMOST_EMPTY.
> > 
> > With this patch, zs_can_compact will return more exact result.
> > 
> > * From v1
> >   * remove unnecessary found variable - Sergey
> > 
> > Signed-off-by: Minchan Kim 
> > 
> 
> Acked-by: Sergey Senozhatsky 
> 

Thanks, Sergey!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] input: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/input/keyboard/adp5589-keys.c   | 1 -
 drivers/input/keyboard/cap11xx.c| 1 -
 drivers/input/keyboard/lm8333.c | 1 -
 drivers/input/keyboard/mcs_touchkey.c   | 1 -
 drivers/input/keyboard/mpr121_touchkey.c| 1 -
 drivers/input/keyboard/qt1070.c | 1 -
 drivers/input/keyboard/qt2160.c | 1 -
 drivers/input/keyboard/tca8418_keypad.c | 1 -
 drivers/input/misc/adxl34x-i2c.c| 1 -
 drivers/input/misc/bma150.c | 1 -
 drivers/input/misc/cma3000_d0x_i2c.c| 1 -
 drivers/input/misc/drv260x.c| 1 -
 drivers/input/misc/drv2665.c| 1 -
 drivers/input/misc/drv2667.c| 1 -
 drivers/input/misc/gp2ap002a00f.c   | 1 -
 drivers/input/misc/kxtj9.c  | 1 -
 drivers/input/misc/mpu3050.c| 1 -
 drivers/input/misc/pcf8574_keypad.c | 1 -
 drivers/input/mouse/cyapa.c | 1 -
 drivers/input/mouse/elan_i2c_core.c | 1 -
 drivers/input/mouse/synaptics_i2c.c | 1 -
 drivers/input/touchscreen/ad7879-i2c.c  | 1 -
 drivers/input/touchscreen/ar1021_i2c.c  | 1 -
 drivers/input/touchscreen/atmel_mxt_ts.c| 1 -
 drivers/input/touchscreen/auo-pixcir-ts.c   | 1 -
 drivers/input/touchscreen/bu21013_ts.c  | 1 -
 drivers/input/touchscreen/chipone_icn8318.c | 1 -
 drivers/input/touchscreen/cy8ctmg110_ts.c   | 1 -
 drivers/input/touchscreen/cyttsp4_i2c.c | 1 -
 drivers/input/touchscreen/cyttsp_i2c.c  | 1 -
 drivers/input/touchscreen/edt-ft5x06.c  | 1 -
 drivers/input/touchscreen/egalax_ts.c   | 1 -
 drivers/input/touchscreen/elants_i2c.c  | 1 -
 drivers/input/touchscreen/goodix.c  | 1 -
 drivers/input/touchscreen/ili210x.c | 1 -
 drivers/input/touchscreen/max11801_ts.c | 1 -
 drivers/input/touchscreen/mms114.c  | 1 -
 drivers/input/touchscreen/pixcir_i2c_ts.c   | 1 -
 drivers/input/touchscreen/st1232.c  | 1 -
 drivers/input/touchscreen/tsc2007.c | 1 -
 drivers/input/touchscreen/wacom_i2c.c   | 1 -
 drivers/input/touchscreen/zforce_ts.c   | 1 -
 42 files changed, 42 deletions(-)

diff --git a/drivers/input/keyboard/adp5589-keys.c 
b/drivers/input/keyboard/adp5589-keys.c
index 6ed83cf8b74e..4d446d5085aa 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -1097,7 +1097,6 @@ MODULE_DEVICE_TABLE(i2c, adp5589_id);
 static struct i2c_driver adp5589_driver = {
.driver = {
.name = KBUILD_MODNAME,
-   .owner = THIS_MODULE,
.pm = &adp5589_dev_pm_ops,
},
.probe = adp5589_probe,
diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c
index f07461a64d85..b58fd9d72d92 100644
--- a/drivers/input/keyboard/cap11xx.c
+++ b/drivers/input/keyboard/cap11xx.c
@@ -361,7 +361,6 @@ MODULE_DEVICE_TABLE(i2c, cap11xx_i2c_ids);
 static struct i2c_driver cap11xx_i2c_driver = {
.driver = {
.name   = "cap11xx",
-   .owner  = THIS_MODULE,
.of_match_table = cap11xx_dt_ids,
},
.id_table   = cap11xx_i2c_ids,
diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c
index 0ad422b8a260..c717e8f3c964 100644
--- a/drivers/input/keyboard/lm8333.c
+++ b/drivers/input/keyboard/lm8333.c
@@ -223,7 +223,6 @@ MODULE_DEVICE_TABLE(i2c, lm8333_id);
 static struct i2c_driver lm8333_driver = {
.driver = {
.name   = "lm8333",
-   .owner  = THIS_MODULE,
},
.probe  = lm8333_probe,
.remove = lm8333_remove,
diff --git a/drivers/input/keyboard/mcs_touchkey.c 
b/drivers/input/keyboard/mcs_touchkey.c
index 375b05ca8e2a..31090d71a685 100644
--- a/drivers/input/keyboard/mcs_touchkey.c
+++ b/drivers/input/keyboard/mcs_touchkey.c
@@ -265,7 +265,6 @@ MODULE_DEVICE_TABLE(i2c, mcs_touchkey_id);
 static struct i2c_driver mcs_touchkey_driver = {
.driver = {
.name   = "mcs_touchkey",
-   .owner  = THIS_MODULE,
.pm = &mcs_touchkey_pm_ops,
},
.probe  = mcs_touchkey_probe,
diff --git a/drivers/input/keyboard/mpr121_touchkey.c 
b/drivers/input/keyboard/mpr121_touchkey.c
index 3aa2ec45bcab..0fd612dd76ed 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -305,7 +305,6 @@ MODULE_DEVICE_TABLE(i2c, mpr121_id);
 static struct i2c_driver mpr_touchkey_driver = {
.driver = {
.name   = "mpr121",
-   .owner  = THIS_MODULE,
.pm = &mpr121_touchkey_pm_ops,
},
.id_table

Re: [PATCH 1/2] power: reset: at91: add sama5d3 reset function

2015-07-09 Thread Alexandre Belloni
Hi Guenter,

On 09/07/2015 at 20:14:38 -0700, Guenter Roeck wrote :
> > This patch introduces a new compatible string: "atmel,sama5d3-rstc" for the
> > reset driver of sama5d3 and later chips.
> > As in sama5d3 or later chips, we don't have to shutdown the DDR controller
> > before reset. Shutdown the DDR controller before reset is a workaround to
> > avoid DDR signal driving the bus, but since sama5d3 and later chips there is
> > no such a conflict.
> > That means:
> >   1. the sama5d3 reset function only need to write the rstc register and
> > return.
> >   2. for sama5d3, we can remove the code related with DDR controller as we
> > don't use it at all.
> > 
> Sorry, I don't get it. Doesn't that mean there are two distinct logical
> changes, which would ask for two separate patches ?

I would agree with Josh and I think that only one patch is needed. There
is only one change, the removal of the workaround for sama5d3 and later.

As the workaround is using a table of compatibles to remap the ram
controller and the one for sama5d3 is not used because it is not needed,
I think it makes sense to remove it in that same patch. The logical
change here is the removal of the workaround.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] iio: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/iio/accel/bma180.c | 1 -
 drivers/iio/accel/st_accel_i2c.c   | 1 -
 drivers/iio/adc/mcp3422.c  | 1 -
 drivers/iio/adc/ti-adc081c.c   | 1 -
 drivers/iio/dac/ad5064.c   | 1 -
 drivers/iio/dac/ad5380.c   | 1 -
 drivers/iio/dac/ad5446.c   | 1 -
 drivers/iio/dac/max5821.c  | 1 -
 drivers/iio/gyro/itg3200_core.c| 1 -
 drivers/iio/gyro/st_gyro_i2c.c | 1 -
 drivers/iio/humidity/si7005.c  | 1 -
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 1 -
 drivers/iio/light/apds9300.c   | 1 -
 drivers/iio/light/bh1750.c | 1 -
 drivers/iio/light/cm32181.c| 1 -
 drivers/iio/light/cm3232.c | 1 -
 drivers/iio/light/cm36651.c| 1 -
 drivers/iio/light/gp2ap020a00f.c   | 1 -
 drivers/iio/light/isl29125.c   | 1 -
 drivers/iio/light/jsa1212.c| 1 -
 drivers/iio/light/ltr501.c | 1 -
 drivers/iio/light/tcs3414.c| 1 -
 drivers/iio/light/tcs3472.c| 1 -
 drivers/iio/light/tsl4531.c| 1 -
 drivers/iio/light/vcnl4000.c   | 1 -
 drivers/iio/magnetometer/st_magn_i2c.c | 1 -
 drivers/iio/pressure/ms5611_i2c.c  | 1 -
 drivers/iio/pressure/st_pressure_i2c.c | 1 -
 drivers/iio/temperature/mlx90614.c | 1 -
 drivers/iio/temperature/tmp006.c   | 1 -
 30 files changed, 30 deletions(-)

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 75c6d2103e07..f04b88406995 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -846,7 +846,6 @@ MODULE_DEVICE_TABLE(i2c, bma180_ids);
 static struct i2c_driver bma180_driver = {
.driver = {
.name   = "bma180",
-   .owner  = THIS_MODULE,
.pm = BMA180_PM_OPS,
},
.probe  = bma180_probe,
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
index d4ad72ca4a3d..a2f1c20319eb 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -122,7 +122,6 @@ MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
 
 static struct i2c_driver st_accel_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = "st-accel-i2c",
.of_match_table = of_match_ptr(st_accel_of_match),
},
diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
index b96c636470ef..3555122008b4 100644
--- a/drivers/iio/adc/mcp3422.c
+++ b/drivers/iio/adc/mcp3422.c
@@ -404,7 +404,6 @@ MODULE_DEVICE_TABLE(of, mcp3422_of_match);
 static struct i2c_driver mcp3422_driver = {
.driver = {
.name = "mcp3422",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(mcp3422_of_match),
},
.probe = mcp3422_probe,
diff --git a/drivers/iio/adc/ti-adc081c.c b/drivers/iio/adc/ti-adc081c.c
index b3a82b4d1a75..2c8374f86252 100644
--- a/drivers/iio/adc/ti-adc081c.c
+++ b/drivers/iio/adc/ti-adc081c.c
@@ -140,7 +140,6 @@ MODULE_DEVICE_TABLE(of, adc081c_of_match);
 static struct i2c_driver adc081c_driver = {
.driver = {
.name = "adc081c",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(adc081c_of_match),
},
.probe = adc081c_probe,
diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
index f03b92fd3803..c067e6821496 100644
--- a/drivers/iio/dac/ad5064.c
+++ b/drivers/iio/dac/ad5064.c
@@ -630,7 +630,6 @@ MODULE_DEVICE_TABLE(i2c, ad5064_i2c_ids);
 static struct i2c_driver ad5064_i2c_driver = {
.driver = {
   .name = "ad5064",
-  .owner = THIS_MODULE,
},
.probe = ad5064_i2c_probe,
.remove = ad5064_i2c_remove,
diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
index 9de4c4d38280..130de9b3e0bf 100644
--- a/drivers/iio/dac/ad5380.c
+++ b/drivers/iio/dac/ad5380.c
@@ -593,7 +593,6 @@ MODULE_DEVICE_TABLE(i2c, ad5380_i2c_ids);
 static struct i2c_driver ad5380_i2c_driver = {
.driver = {
   .name = "ad5380",
-  .owner = THIS_MODULE,
},
.probe = ad5380_i2c_probe,
.remove = ad5380_i2c_remove,
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index 46bb62a5c1d4..07e17d72a3f3 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -569,7 +569,6 @@ MODULE_DEVICE_TABLE(i2c, ad5446_i2c_ids);
 static struct i2c_driver ad5446_i2c_driver = {
.driver = {
   .name = "ad5446",
-  .owner = THIS_MODULE,

[PATCH] acpi-cpufreq: Fix an acpi perf unregister issue

2015-07-09 Thread Pan Xinhui

As policy->cpu may not be same in acpi_cpufreq_cpu_init and
acpi_cpufreq_cpu_exit. There is a risk that we use different *cpu* to
un/register acpi performance. So acpi_processor_unregister_performance
may not be able to do the cleanup work. That causes a memory leak. And
if there will be another acpi_processor_register_performance call, it
may also fail thanks to the internal check of pr->performace.

So we add a field *perf_cpu* to fix this issue.

Signed-off-by: Pan Xinhui 
---
 drivers/cpufreq/acpi-cpufreq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 314a19e..8cad583 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -69,6 +69,7 @@ struct acpi_cpufreq_data {
struct cpufreq_frequency_table *freq_table;
unsigned int resume;
unsigned int cpu_feature;
+   unsigned int acpi_perf_cpu;
cpumask_var_t freqdomain_cpus;
 };
 
@@ -677,6 +678,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy 
*policy)
}
 
data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu);
+   data->acpi_perf_cpu = cpu;
policy->driver_data = data;
 
if (cpu_has(c, X86_FEATURE_CONSTANT_TSC))
@@ -861,7 +863,7 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy 
*policy)
if (data) {
policy->driver_data = NULL;
acpi_processor_unregister_performance(data->acpi_data,
- policy->cpu);
+ data->acpi_perf_cpu);
free_cpumask_var(data->freqdomain_cpus);
kfree(data->freq_table);
kfree(data);
-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] i2c: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/i2c/i2c-slave-eeprom.c  | 1 -
 drivers/i2c/muxes/i2c-mux-pca9541.c | 1 -
 drivers/i2c/muxes/i2c-mux-pca954x.c | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c
index 822374654609..aed3298ad6aa 100644
--- a/drivers/i2c/i2c-slave-eeprom.c
+++ b/drivers/i2c/i2c-slave-eeprom.c
@@ -163,7 +163,6 @@ MODULE_DEVICE_TABLE(i2c, i2c_slave_eeprom_id);
 static struct i2c_driver i2c_slave_eeprom_driver = {
.driver = {
.name = "i2c-slave-eeprom",
-   .owner = THIS_MODULE,
},
.probe = i2c_slave_eeprom_probe,
.remove = i2c_slave_eeprom_remove,
diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c 
b/drivers/i2c/muxes/i2c-mux-pca9541.c
index 0c8d4d2cbdaf..d0ba424adebc 100644
--- a/drivers/i2c/muxes/i2c-mux-pca9541.c
+++ b/drivers/i2c/muxes/i2c-mux-pca9541.c
@@ -386,7 +386,6 @@ static int pca9541_remove(struct i2c_client *client)
 static struct i2c_driver pca9541_driver = {
.driver = {
   .name = "pca9541",
-  .owner = THIS_MODULE,
   },
.probe = pca9541_probe,
.remove = pca9541_remove,
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c 
b/drivers/i2c/muxes/i2c-mux-pca954x.c
index ea4aa9dfcea9..acfcef3d4068 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -300,7 +300,6 @@ static struct i2c_driver pca954x_driver = {
.driver = {
.name   = "pca954x",
.pm = &pca954x_pm,
-   .owner  = THIS_MODULE,
},
.probe  = pca954x_probe,
.remove = pca954x_remove,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] acpi-cpufreq: Add a miss ifdef CONFIG_X86_ACPI_CPUFREQ_CPB

2015-07-09 Thread Pan Xinhui

If CONFIG_X86_ACPI_CPUFREQ_CPB has not been defined, the placeholder for
cpb is not needed. Add ifdef around it.

Signed-off-by: Pan Xinhui 
---
 drivers/cpufreq/acpi-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index e7fcaa6..314a19e 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -884,7 +884,9 @@ static int acpi_cpufreq_resume(struct cpufreq_policy 
*policy)
 static struct freq_attr *acpi_cpufreq_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
&freqdomain_cpus,
+#ifdef CONFIG_X86_ACPI_CPUFREQ_CPB
NULL,   /* this is a placeholder for cpb, do not remove */
+#endif
NULL,
 };
 
-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] hwmon: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/hwmon/g762.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c
index 9b55e673b67c..3d845947f584 100644
--- a/drivers/hwmon/g762.c
+++ b/drivers/hwmon/g762.c
@@ -1112,7 +1112,6 @@ static int g762_remove(struct i2c_client *client)
 static struct i2c_driver g762_driver = {
.driver = {
.name = DRVNAME,
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(g762_dt_match),
},
.probe= g762_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] gpio: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/gpio/gpio-adnp.c   | 1 -
 drivers/gpio/gpio-max7300.c| 1 -
 drivers/gpio/gpio-max732x.c| 1 -
 drivers/gpio/gpio-mc9s08dz60.c | 1 -
 drivers/gpio/gpio-mcp23s08.c   | 1 -
 drivers/gpio/gpio-pcf857x.c| 1 -
 drivers/gpio/gpio-sx150x.c | 1 -
 7 files changed, 7 deletions(-)

diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c
index d3d0a90fe542..85223aac8c55 100644
--- a/drivers/gpio/gpio-adnp.c
+++ b/drivers/gpio/gpio-adnp.c
@@ -547,7 +547,6 @@ MODULE_DEVICE_TABLE(of, adnp_of_match);
 static struct i2c_driver adnp_i2c_driver = {
.driver = {
.name = "gpio-adnp",
-   .owner = THIS_MODULE,
.of_match_table = adnp_of_match,
},
.probe = adnp_i2c_probe,
diff --git a/drivers/gpio/gpio-max7300.c b/drivers/gpio/gpio-max7300.c
index 0cc2c279ab5c..1ae9ba851c9a 100644
--- a/drivers/gpio/gpio-max7300.c
+++ b/drivers/gpio/gpio-max7300.c
@@ -65,7 +65,6 @@ MODULE_DEVICE_TABLE(i2c, max7300_id);
 static struct i2c_driver max7300_driver = {
.driver = {
.name = "max7300",
-   .owner = THIS_MODULE,
},
.probe = max7300_probe,
.remove = max7300_remove,
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index aed4ca9338bc..4958b433bb0c 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -743,7 +743,6 @@ static int max732x_remove(struct i2c_client *client)
 static struct i2c_driver max732x_driver = {
.driver = {
.name   = "max732x",
-   .owner  = THIS_MODULE,
.of_match_table = of_match_ptr(max732x_of_table),
},
.probe  = max732x_probe,
diff --git a/drivers/gpio/gpio-mc9s08dz60.c b/drivers/gpio/gpio-mc9s08dz60.c
index d62b4f8182bf..0a1505df3338 100644
--- a/drivers/gpio/gpio-mc9s08dz60.c
+++ b/drivers/gpio/gpio-mc9s08dz60.c
@@ -131,7 +131,6 @@ MODULE_DEVICE_TABLE(i2c, mc9s08dz60_id);
 
 static struct i2c_driver mc9s08dz60_i2c_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = "mc9s08dz60",
},
.probe = mc9s08dz60_probe,
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c
index 2fc7ff852d16..822f1527a844 100644
--- a/drivers/gpio/gpio-mcp23s08.c
+++ b/drivers/gpio/gpio-mcp23s08.c
@@ -852,7 +852,6 @@ MODULE_DEVICE_TABLE(i2c, mcp230xx_id);
 static struct i2c_driver mcp230xx_driver = {
.driver = {
.name   = "mcp230xx",
-   .owner  = THIS_MODULE,
.of_match_table = of_match_ptr(mcp23s08_i2c_of_match),
},
.probe  = mcp230xx_probe,
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index 404f3c61ef9b..fd539c1f92b0 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -451,7 +451,6 @@ static int pcf857x_remove(struct i2c_client *client)
 static struct i2c_driver pcf857x_driver = {
.driver = {
.name   = "pcf857x",
-   .owner  = THIS_MODULE,
.of_match_table = of_match_ptr(pcf857x_of_table),
},
.probe  = pcf857x_probe,
diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c
index 458d9d7952b8..ae248a5986d7 100644
--- a/drivers/gpio/gpio-sx150x.c
+++ b/drivers/gpio/gpio-sx150x.c
@@ -683,7 +683,6 @@ static int sx150x_remove(struct i2c_client *client)
 static struct i2c_driver sx150x_driver = {
.driver = {
.name = "sx150x",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(sx150x_of_match),
},
.probe= sx150x_probe,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] hid: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/hid/i2c-hid/i2c-hid.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index f77469d4edfb..dfd679647391 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1167,7 +1167,6 @@ MODULE_DEVICE_TABLE(i2c, i2c_hid_id_table);
 static struct i2c_driver i2c_hid_driver = {
.driver = {
.name   = "i2c_hid",
-   .owner  = THIS_MODULE,
.pm = &i2c_hid_pm,
.acpi_match_table = ACPI_PTR(i2c_hid_acpi_match),
.of_match_table = of_match_ptr(i2c_hid_of_match),
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] extcon: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/extcon/extcon-rt8973a.c | 1 -
 drivers/extcon/extcon-sm5502.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c
index 92c939221a41..11592e980bc1 100644
--- a/drivers/extcon/extcon-rt8973a.c
+++ b/drivers/extcon/extcon-rt8973a.c
@@ -693,7 +693,6 @@ MODULE_DEVICE_TABLE(i2c, rt8973a_i2c_id);
 static struct i2c_driver rt8973a_muic_i2c_driver = {
.driver = {
.name   = "rt8973a",
-   .owner  = THIS_MODULE,
.pm = &rt8973a_muic_pm_ops,
.of_match_table = rt8973a_dt_match,
},
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index 817dece23b4c..0ffefefa2e26 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -685,7 +685,6 @@ MODULE_DEVICE_TABLE(i2c, sm5502_i2c_id);
 static struct i2c_driver sm5502_muic_i2c_driver = {
.driver = {
.name   = "sm5502",
-   .owner  = THIS_MODULE,
.pm = &sm5502_muic_pm_ops,
.of_match_table = sm5502_dt_match,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: Tree for Jul 10

2015-07-09 Thread Stephen Rothwell
Hi all,

Changes since 20150709:

The drm-intel tree gained conflicts against the drm-intel-fixes trees.

Non-merge commits (relative to Linus' tree): 1420
 1324 files changed, 75720 insertions(+), 21647 deletions(-)



I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/next/ ).  If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one.  You should use "git fetch" and checkout or reset to the new
master.

You can see which trees have been included by looking in the Next/Trees
file in the source.  There are also quilt-import.log and merge.log
files in the Next directory.  Between each merge, the tree was built
with a ppc64_defconfig for powerpc and an allmodconfig for x86_64,
a multi_v7_defconfig for arm and a native build of tools/perf. After
the final fixups (if any), it is also built with powerpc allnoconfig
(32 and 64 bit), ppc44x_defconfig and allyesconfig (this fails its final
link) and i386, sparc, sparc64 and arm defconfig.

Below is a summary of the state of the merge.

I am currently merging 223 trees (counting Linus' and 32 trees of patches
pending for Linus' tree).

Stats about the size of the tree over time can be seen at
http://neuling.org/linux-next-size.html .

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more builds.

Thanks to Randy Dunlap for doing many randconfig builds.  And to Paul
Gortmaker for triage and bug fixes.

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

$ git checkout master
$ git reset --hard stable
Merging origin/master (c4b5fd3fb205 Merge branch 'hpfs-patches' (patches from 
Mikulas Patocka))
Merging fixes/master (c7e9ad7da219 Merge branch 'perf-urgent-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)
Merging kbuild-current/rc-fixes (c517d838eb7d Linux 4.0-rc1)
Merging arc-current/for-curr (e4140819dadc ARC: signal handling robustify)
Merging arm-current/fixes (11b8b25ce4f8 ARM: fix lockdep unannotated irqs-off 
warning)
Merging m68k-current/for-linus (1214c525484c m68k: Use for_each_sg())
Merging metag-fixes/fixes (0164a711c97b metag: Fix ioremap_wc/ioremap_cached 
build errors)
Merging mips-fixes/mips-fixes (1795cd9b3a91 Linux 3.16-rc5)
Merging powerpc-fixes/fixes (9958084a5275 powerpc: Update MAINTAINERS to point 
at shared tree)
Merging powerpc-merge-mpe/fixes (a8956a7b7232 powerpc/powernv: Fix opal-elog 
interrupt handler)
Merging powerpc-merge-benh/merge (c517d838eb7d Linux 4.0-rc1)
Merging sparc/master (4a10a91756ef Merge branch 'upstream' of 
git://git.infradead.org/users/pcmoore/audit)
Merging net/master (fc5778ca3f3c Merge branch 'pktgen-races')
Merging ipsec/master (31a418986a58 xen: netback: read hotplug script once at 
start of day.)
Merging sound-current/for-linus (d1f15e06b2af ALSA: hda - Fix a wrong busy 
check in alt PCM open)
Merging pci-current/for-linus (552bc94ebeeb PCI: Preserve resource size during 
alignment reordering)
Merging wireless-drivers/master (38fe44e61a89 Merge tag 
'iwlwifi-for-kalle-2015-05-28' of 
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes)
Merging driver-core.current/driver-core-linus (d770e558e219 Linux 4.2-rc1)
Merging tty.current/tty-linus (d770e558e219 Linux 4.2-rc1)
Merging usb.current/usb-linus (d4669bb1427c Merge tag 'fixes-for-v4.2-rc2' of 
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus)
Merging usb-gadget-fixes/fixes (b2e2c94b878b usb: gadget: f_midi: fix error 
recovery path)
Merging usb-serial-fixes/usb-linus (d23f47d4927f USB: serial: Destroy 
serial_minors IDR on module exit)
Merging staging.current/staging-linus (cbe4f4434ded staging:lustre: remove 
irq.h from socklnd.h)
Merging char-misc.current/char-misc-linus (d770e558e219 Linux 4.2-rc1)
Merging input-current/for-linus (539c4b88146c Input: elan_i2c - change the 
hover event from MT to ST)
Merging crypto-current/master (030f4e968741 crypto: nx - Fix reentrancy bugs)
Merging ide/master (d681f1166919 ide: remove deprecated use of pci api)
Merging devicetree-current/devicetree/merge (f76502aa9140 of/dynamic: Fix test 
for PPC_PSERIES)
Merging rr-fixes/fixes (758556bdc1c8 module: Fix load_module() error path)
Merging vfio-fixes/for-linus (db7d4d7f4021 vfio: Fix runaway interruptible 
timeout)
Merging kselftest-fixes/fixes (ba155e2d21f6 Linux 4.1-rc5)
Merging backlight-fixes/for-backlight-fixes (68feaca0b13e backlight: pwm: 
Handle EPROBE_DEFER while requesting the PWM)
Merging drm-intel-fixes/for-linux-next-fixes (b52b374eb348 drm/i915: avoid 
lea

Re: [PATCH 36/36] PCI: Don't set flags to 0 when assign resource fail

2015-07-09 Thread Yinghai Lu
On Thu, Jul 9, 2015 at 7:48 PM, Yinghai Lu  wrote:
> On Thu, Jul 9, 2015 at 7:30 PM, Wei Yang  wrote:
>> If you could update your for-pci-v4.3-next branch, that would be more
>> convenient for me to do the test.
>
> Just updated that branch, please check it.
>

just updated the branch again.

If you don't want to re get it again, please apply attached patch.
---
 drivers/pci/bus.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/pci/bus.c
===
--- linux-2.6.orig/drivers/pci/bus.c
+++ linux-2.6/drivers/pci/bus.c
@@ -140,7 +140,7 @@ static int pci_bus_alloc_from_region(str
 	type_mask |= IORESOURCE_TYPE_BITS;
 
 	pci_bus_for_each_resource(bus, r, i) {
-		if (!r)
+		if (!r || resource_disabled(r))
 			continue;
 
 		/* type_mask must match */


[PATCH] edac: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/edac/xgene_edac.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index 14636e4b6a08..ba06904af2e1 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1168,7 +1168,6 @@ static struct platform_driver xgene_edac_driver = {
.remove = xgene_edac_remove,
.driver = {
.name = "xgene-edac",
-   .owner = THIS_MODULE,
.of_match_table = xgene_edac_of_match,
},
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/2] clk: mediatek: Add MT8173 MMPLL change rate support

2015-07-09 Thread James Liao
Hi Stephen,

On Wed, 2015-07-08 at 17:46 -0700, Stephen Boyd wrote:
> On 07/08/2015 01:37 AM, James Liao wrote:
> > diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c
> > index 68af518..622e7b6 100644
> > --- a/drivers/clk/mediatek/clk-pll.c
> > +++ b/drivers/clk/mediatek/clk-pll.c
> > @@ -138,16 +138,28 @@ static void mtk_pll_calc_values(struct mtk_clk_pll 
> > *pll, u32 *pcw, u32 *postdiv,
> > u32 freq, u32 fin)
> >  {
> > unsigned long fmin = 1000 * MHZ;
> > +   const struct mtk_pll_div_table *div_table = pll->data->div_table;
> > u64 _pcw;
> > u32 val;
> >  
> > if (freq > pll->data->fmax)
> > freq = pll->data->fmax;
> >  
> > -   for (val = 0; val < 4; val++) {
> > +   if (div_table) {
> > +   if (freq > div_table[0].freq)
> > +   freq = div_table[0].freq;
> > +
> > +   for (val = 0; div_table[val + 1].freq != 0; val++) {
> > +   if (freq > div_table[val + 1].freq)
> > +   break;
> > +   }
> > *postdiv = 1 << val;
> > -   if (freq * *postdiv >= fmin)
> > -   break;
> > +   } else {
> > +   for (val = 0; val < 5; val++) {
> > +   *postdiv = 1 << val;
> > +   if ((u64)freq * *postdiv >= fmin)
> >
> 
> No mention of this cast in the commit text. Is this fixing a bug? If so,
> please mention it and/or split this bug fix off of this patch.
> 

Yes, this is a fix to avoid u32 overflow. I'll split it in next patch.


Best regards,

James


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] crypto: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/crypto/marvell/cesa.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
index 1c6f98dd88f4..0643e3366e33 100644
--- a/drivers/crypto/marvell/cesa.c
+++ b/drivers/crypto/marvell/cesa.c
@@ -533,7 +533,6 @@ static struct platform_driver marvell_cesa = {
.probe  = mv_cesa_probe,
.remove = mv_cesa_remove,
.driver = {
-   .owner  = THIS_MODULE,
.name   = "marvell-cesa",
.of_match_table = mv_cesa_of_match_table,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] zsmalloc: consider ZS_ALMOST_FULL as migrate source

2015-07-09 Thread Sergey Senozhatsky
On (07/10/15 14:31), Minchan Kim wrote:
> There is no reason to prevent select ZS_ALMOST_FULL as migration
> source if we cannot find source from ZS_ALMOST_EMPTY.
> 
> With this patch, zs_can_compact will return more exact result.
> 
> * From v1
>   * remove unnecessary found variable - Sergey
> 
> Signed-off-by: Minchan Kim 
> 

Acked-by: Sergey Senozhatsky 

-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/2] Add MT8173 MMPLL change rate support

2015-07-09 Thread James Liao
Hi Stephen,

On Wed, 2015-07-08 at 17:44 -0700, Stephen Boyd wrote:
> On 07/08/2015 01:37 AM, James Liao wrote:
> > MT8173 MMPLL frequency settings are different from common PLLs.
> > It needs different post divider settings for some ranges of frequency.
> > This patch add support for MT8173 MMPLL frequency setting, includes:
> >
> > 1. Add div-rate table for PLLs.
> > 2. Increase the max ost divider setting from 3 (/8) to 4 (/16).
> > 3. Write postdiv and pcw settings at the same time.
> >
> > James Liao (2):
> >   clk: mediatek: Fix PLL registers setting flow
> >   clk: mediatek: Add MT8173 MMPLL change rate support
> >
> 
> Are these fixing regressions in 4.2-rc1? I don't see any "Fixes:" tag so
> it's not clear and makes me want to defer these until v4.3. Furthermore,
> the subject starts with "Add" so it sounds like a new feature.

This patchset is based on 4.1-rc1 but it had been tested on 4.2-rc1.
I'll send a new patch which based on 4.2-rc1.

This patchset contains some general PLL fixes and MMPLL set rate
support. We can say the last one is also a fix because changing some
specific rate on MMPLL may fail in current implementation.


Best regards,

James

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] regulator: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/regulator/act8865-regulator.c  | 1 -
 drivers/regulator/da9210-regulator.c   | 1 -
 drivers/regulator/da9211-regulator.c   | 1 -
 drivers/regulator/isl6271a-regulator.c | 1 -
 drivers/regulator/isl9305.c| 1 -
 drivers/regulator/lp3971.c | 1 -
 drivers/regulator/lp3972.c | 1 -
 drivers/regulator/lp872x.c | 1 -
 drivers/regulator/ltc3589.c| 1 -
 drivers/regulator/max1586.c| 1 -
 drivers/regulator/max8660.c| 1 -
 drivers/regulator/max8973-regulator.c  | 1 -
 drivers/regulator/pfuze100-regulator.c | 1 -
 drivers/regulator/tps51632-regulator.c | 1 -
 drivers/regulator/tps62360-regulator.c | 1 -
 drivers/regulator/tps65023-regulator.c | 1 -
 16 files changed, 16 deletions(-)

diff --git a/drivers/regulator/act8865-regulator.c 
b/drivers/regulator/act8865-regulator.c
index 2ff73d72ca34..896db168e4bd 100644
--- a/drivers/regulator/act8865-regulator.c
+++ b/drivers/regulator/act8865-regulator.c
@@ -530,7 +530,6 @@ MODULE_DEVICE_TABLE(i2c, act8865_ids);
 static struct i2c_driver act8865_pmic_driver = {
.driver = {
.name   = "act8865",
-   .owner  = THIS_MODULE,
},
.probe  = act8865_pmic_probe,
.id_table   = act8865_ids,
diff --git a/drivers/regulator/da9210-regulator.c 
b/drivers/regulator/da9210-regulator.c
index 8e39f7457bc3..b3517830edb6 100644
--- a/drivers/regulator/da9210-regulator.c
+++ b/drivers/regulator/da9210-regulator.c
@@ -259,7 +259,6 @@ MODULE_DEVICE_TABLE(i2c, da9210_i2c_id);
 static struct i2c_driver da9210_regulator_driver = {
.driver = {
.name = "da9210",
-   .owner = THIS_MODULE,
},
.probe = da9210_i2c_probe,
.id_table = da9210_i2c_id,
diff --git a/drivers/regulator/da9211-regulator.c 
b/drivers/regulator/da9211-regulator.c
index df79e4b1946e..ab8914f280c7 100644
--- a/drivers/regulator/da9211-regulator.c
+++ b/drivers/regulator/da9211-regulator.c
@@ -494,7 +494,6 @@ MODULE_DEVICE_TABLE(of, da9211_dt_ids);
 static struct i2c_driver da9211_regulator_driver = {
.driver = {
.name = "da9211",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(da9211_dt_ids),
},
.probe = da9211_i2c_probe,
diff --git a/drivers/regulator/isl6271a-regulator.c 
b/drivers/regulator/isl6271a-regulator.c
index 6e5da95fa025..4abd8e9c81e5 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -156,7 +156,6 @@ MODULE_DEVICE_TABLE(i2c, isl6271a_id);
 static struct i2c_driver isl6271a_i2c_driver = {
.driver = {
.name = "isl6271a",
-   .owner = THIS_MODULE,
},
.probe = isl6271a_probe,
.id_table = isl6271a_id,
diff --git a/drivers/regulator/isl9305.c b/drivers/regulator/isl9305.c
index 6e3a15fe00f1..eae9d1ffe641 100644
--- a/drivers/regulator/isl9305.c
+++ b/drivers/regulator/isl9305.c
@@ -195,7 +195,6 @@ MODULE_DEVICE_TABLE(i2c, isl9305_i2c_id);
 static struct i2c_driver isl9305_regulator_driver = {
.driver = {
.name = "isl9305",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(isl9305_dt_ids),
},
.probe = isl9305_i2c_probe,
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 66fd2330dca0..15c25c622edf 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -452,7 +452,6 @@ MODULE_DEVICE_TABLE(i2c, lp3971_i2c_id);
 static struct i2c_driver lp3971_i2c_driver = {
.driver = {
.name = "LP3971",
-   .owner = THIS_MODULE,
},
.probe= lp3971_i2c_probe,
.id_table = lp3971_i2c_id,
diff --git a/drivers/regulator/lp3972.c b/drivers/regulator/lp3972.c
index aea485afcc1a..3a7e96e2c7b3 100644
--- a/drivers/regulator/lp3972.c
+++ b/drivers/regulator/lp3972.c
@@ -550,7 +550,6 @@ MODULE_DEVICE_TABLE(i2c, lp3972_i2c_id);
 static struct i2c_driver lp3972_i2c_driver = {
.driver = {
.name = "lp3972",
-   .owner = THIS_MODULE,
},
.probe= lp3972_i2c_probe,
.id_table = lp3972_i2c_id,
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 3de328ab41f3..171c7625dd67 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -955,7 +955,6 @@ MODULE_DEVICE_TABLE(i2c, lp872x_ids);
 static struct i2c_driver lp872x_driver = {
.driver = {
.name = "lp872x",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(lp872x_dt_ids),
},
.probe = lp872x_probe,
diff --git a/drivers/regula

[PATCH 2/2] regulator: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/regulator/da9062-regulator.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/da9062-regulator.c 
b/drivers/regulator/da9062-regulator.c
index dd76da09b3c7..5638fe8d759d 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -818,7 +818,6 @@ static int da9062_regulator_probe(struct platform_device 
*pdev)
 static struct platform_driver da9062_regulator_driver = {
.driver = {
.name = "da9062-regulators",
-   .owner = THIS_MODULE,
},
.probe = da9062_regulator_probe,
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof

Krzysztof Kozlowski (2):
  regulator: Drop owner assignment from i2c_driver
  regulator: Drop owner assignment from platform_driver

 drivers/regulator/act8865-regulator.c  | 1 -
 drivers/regulator/da9062-regulator.c   | 1 -
 drivers/regulator/da9210-regulator.c   | 1 -
 drivers/regulator/da9211-regulator.c   | 1 -
 drivers/regulator/isl6271a-regulator.c | 1 -
 drivers/regulator/isl9305.c| 1 -
 drivers/regulator/lp3971.c | 1 -
 drivers/regulator/lp3972.c | 1 -
 drivers/regulator/lp872x.c | 1 -
 drivers/regulator/ltc3589.c| 1 -
 drivers/regulator/max1586.c| 1 -
 drivers/regulator/max8660.c| 1 -
 drivers/regulator/max8973-regulator.c  | 1 -
 drivers/regulator/pfuze100-regulator.c | 1 -
 drivers/regulator/tps51632-regulator.c | 1 -
 drivers/regulator/tps62360-regulator.c | 1 -
 drivers/regulator/tps65023-regulator.c | 1 -
 17 files changed, 17 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] power_supply: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/power/bq24190_charger.c | 1 -
 drivers/power/bq24735-charger.c | 1 -
 drivers/power/pm2301_charger.c  | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/power/bq24190_charger.c b/drivers/power/bq24190_charger.c
index 052db78c3736..703ebecaf38b 100644
--- a/drivers/power/bq24190_charger.c
+++ b/drivers/power/bq24190_charger.c
@@ -1534,7 +1534,6 @@ static struct i2c_driver bq24190_driver = {
.id_table   = bq24190_i2c_ids,
.driver = {
.name   = "bq24190-charger",
-   .owner  = THIS_MODULE,
.pm = &bq24190_pm_ops,
.of_match_table = of_match_ptr(bq24190_of_match),
},
diff --git a/drivers/power/bq24735-charger.c b/drivers/power/bq24735-charger.c
index 961a18930027..b0174379713c 100644
--- a/drivers/power/bq24735-charger.c
+++ b/drivers/power/bq24735-charger.c
@@ -409,7 +409,6 @@ MODULE_DEVICE_TABLE(of, bq24735_match_ids);
 static struct i2c_driver bq24735_charger_driver = {
.driver = {
.name = "bq24735-charger",
-   .owner = THIS_MODULE,
.of_match_table = bq24735_match_ids,
},
.probe = bq24735_charger_probe,
diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c
index cc0893ffbf7e..3a45cc0c4dce 100644
--- a/drivers/power/pm2301_charger.c
+++ b/drivers/power/pm2301_charger.c
@@ -1244,7 +1244,6 @@ static struct i2c_driver pm2xxx_charger_driver = {
.remove = pm2xxx_wall_charger_remove,
.driver = {
.name = "pm2xxx-wall_charger",
-   .owner = THIS_MODULE,
.pm = PM2XXX_PM_OPS,
},
.id_table = pm2xxx_id,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] phy: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/phy/phy-armada375-usb2.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/phy/phy-armada375-usb2.c b/drivers/phy/phy-armada375-usb2.c
index 8ccc3952c13d..39c7d21f12da 100644
--- a/drivers/phy/phy-armada375-usb2.c
+++ b/drivers/phy/phy-armada375-usb2.c
@@ -149,7 +149,6 @@ static struct platform_driver armada375_usb_phy_driver = {
.driver = {
.of_match_table = of_usb_cluster_table,
.name  = "armada-375-usb-cluster",
-   .owner = THIS_MODULE,
}
 };
 module_platform_driver(armada375_usb_phy_driver);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drm: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/gpu/drm/bridge/ps8622.c | 1 -
 drivers/gpu/drm/bridge/ptn3460.c| 1 -
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ps8622.c b/drivers/gpu/drm/bridge/ps8622.c
index 1a6607beb29f..be881e9fef8f 100644
--- a/drivers/gpu/drm/bridge/ps8622.c
+++ b/drivers/gpu/drm/bridge/ps8622.c
@@ -668,7 +668,6 @@ static struct i2c_driver ps8622_driver = {
.remove = ps8622_remove,
.driver = {
.name   = "ps8622",
-   .owner  = THIS_MODULE,
.of_match_table = ps8622_devices,
},
 };
diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c
index 1b1bf2384815..0ffa3a6a206a 100644
--- a/drivers/gpu/drm/bridge/ptn3460.c
+++ b/drivers/gpu/drm/bridge/ptn3460.c
@@ -400,7 +400,6 @@ static struct i2c_driver ptn3460_driver = {
.remove = ptn3460_remove,
.driver = {
.name   = "nxp,ptn3460",
-   .owner  = THIS_MODULE,
.of_match_table = ptn3460_match,
},
 };
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c 
b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 01b558fe3695..9a0c2911272a 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -555,7 +555,6 @@ static struct platform_driver rockchip_drm_platform_driver 
= {
.probe = rockchip_drm_platform_probe,
.remove = rockchip_drm_platform_remove,
.driver = {
-   .owner = THIS_MODULE,
.name = "rockchip-drm",
.of_match_table = rockchip_drm_dt_ids,
.pm = &rockchip_drm_pm_ops,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (1):
  drm: Drop owner assignment from i2c_driver

 drivers/gpu/drm/bridge/ps8622.c | 1 -
 drivers/gpu/drm/bridge/ptn3460.c| 1 -
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 -
 3 files changed, 3 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging: sm750fb: ddk750_dvi.h: Fix brace coding style issue

2015-07-09 Thread Sudip Mukherjee
On Thu, Jul 09, 2015 at 02:45:22PM +0200, anders.fridl...@gmail.com wrote:
> From: Anders Fridlund 
same comment that I gave to your another patch.
"No need to mention this From: here. Please fix your .gitconfig so that
git send-email will put your name in the email From: header."

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] zsmalloc: consider ZS_ALMOST_FULL as migrate source

2015-07-09 Thread Sergey Senozhatsky
On (07/10/15 14:21), Minchan Kim wrote:
> > I mean I find your argument that some level of fragmentation
> > can be of use to be valid, to some degree.
> 
> The benefit I had in mind was to prevent failure of allocation.
> 

Sure. I tested the patch.

cat /sys/block/zram0/mm_stat
3122102272 2882639758 28903669760 2969432064   5579294

cat /sys/block/zram0/stat
7212057696   73  75132540 6010603252096 0   
 5210652113

Compaction stats:

[14637.002961] compaction nr:89 (full:528 part:3027)  ~= 0.148

Nothing `alarming'.


> > I'm thinking now, does it make sense to try harder here? if we
> > failed to alloc_zspage(), then may be we can try any of unused
> > objects from a 'upper' (larger/next) class?  there might be a
> > plenty of them.
> 
> I actually thought about that but I didn't have any report from
> community and product division of my compamy until now.
> But with auto-compaction, the chance would be higher than old
> so let's keep an eye on it(I think users can find it easily because
> swap layer emits "write write failure").
> 
> If it happens(ie, any report from someone), we could try to compact
> and then if it fails, we could fall back to upper class as a last
> resort.
> 

OK.

-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] char: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/char/ipmi/ipmi_ssif.c   | 1 -
 drivers/char/tpm/st33zp24/i2c.c | 1 -
 drivers/char/tpm/tpm_i2c_atmel.c| 1 -
 drivers/char/tpm/tpm_i2c_infineon.c | 1 -
 drivers/char/tpm/tpm_i2c_nuvoton.c  | 1 -
 5 files changed, 5 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index b043d8d45823..003a4ab3b660 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1950,7 +1950,6 @@ MODULE_DEVICE_TABLE(i2c, ssif_id);
 static struct i2c_driver ssif_i2c_driver = {
.class  = I2C_CLASS_HWMON,
.driver = {
-   .owner  = THIS_MODULE,
.name   = DEVICE_NAME
},
.probe  = ssif_probe,
diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c
index ad1ee180e0c2..309d2767c6a1 100644
--- a/drivers/char/tpm/st33zp24/i2c.c
+++ b/drivers/char/tpm/st33zp24/i2c.c
@@ -258,7 +258,6 @@ static SIMPLE_DEV_PM_OPS(st33zp24_i2c_ops, 
st33zp24_pm_suspend,
 
 static struct i2c_driver st33zp24_i2c_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = TPM_ST33_I2C,
.pm = &st33zp24_i2c_ops,
.of_match_table = of_match_ptr(of_st33zp24_i2c_match),
diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c
index 7a0ca78ad3c6..8dfb88b9739c 100644
--- a/drivers/char/tpm/tpm_i2c_atmel.c
+++ b/drivers/char/tpm/tpm_i2c_atmel.c
@@ -217,7 +217,6 @@ static struct i2c_driver i2c_atmel_driver = {
.remove = i2c_atmel_remove,
.driver = {
.name = I2C_DRIVER_NAME,
-   .owner = THIS_MODULE,
.pm = &i2c_atmel_pm_ops,
.of_match_table = of_match_ptr(i2c_atmel_of_match),
},
diff --git a/drivers/char/tpm/tpm_i2c_infineon.c 
b/drivers/char/tpm/tpm_i2c_infineon.c
index 33c5f360ab01..63d5d22e9e60 100644
--- a/drivers/char/tpm/tpm_i2c_infineon.c
+++ b/drivers/char/tpm/tpm_i2c_infineon.c
@@ -711,7 +711,6 @@ static struct i2c_driver tpm_tis_i2c_driver = {
.remove = tpm_tis_i2c_remove,
.driver = {
   .name = "tpm_i2c_infineon",
-  .owner = THIS_MODULE,
   .pm = &tpm_tis_i2c_ops,
   .of_match_table = of_match_ptr(tpm_tis_i2c_of_match),
   },
diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c 
b/drivers/char/tpm/tpm_i2c_nuvoton.c
index 9d42b7d78e50..847f1597fe9b 100644
--- a/drivers/char/tpm/tpm_i2c_nuvoton.c
+++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
@@ -641,7 +641,6 @@ static struct i2c_driver i2c_nuvoton_driver = {
.remove = i2c_nuvoton_remove,
.driver = {
.name = I2C_DRIVER_NAME,
-   .owner = THIS_MODULE,
.pm = &i2c_nuvoton_pm_ops,
.of_match_table = of_match_ptr(i2c_nuvoton_of_match),
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof

Krzysztof Kozlowski (1):
  char: Drop owner assignment from i2c_driver

 drivers/char/ipmi/ipmi_ssif.c   | 1 -
 drivers/char/tpm/st33zp24/i2c.c | 1 -
 drivers/char/tpm/tpm_i2c_atmel.c| 1 -
 drivers/char/tpm/tpm_i2c_infineon.c | 1 -
 drivers/char/tpm/tpm_i2c_nuvoton.c  | 1 -
 5 files changed, 5 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] zsmalloc: consider ZS_ALMOST_FULL as migrate source

2015-07-09 Thread Minchan Kim
From: Minchan Kim 

There is no reason to prevent select ZS_ALMOST_FULL as migration
source if we cannot find source from ZS_ALMOST_EMPTY.

With this patch, zs_can_compact will return more exact result.

* From v1
  * remove unnecessary found variable - Sergey

Signed-off-by: Minchan Kim 
---
 mm/zsmalloc.c |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 8c78bcb..9012645 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1686,11 +1686,17 @@ static enum fullness_group putback_zspage(struct 
zs_pool *pool,
 
 static struct page *isolate_source_page(struct size_class *class)
 {
-   struct page *page;
+   int i;
+   struct page *page = NULL;
+
+   for (i = ZS_ALMOST_EMPTY; i >= ZS_ALMOST_FULL; i--) {
+   page = class->fullness_list[i];
+   if (!page)
+   continue;
 
-   page = class->fullness_list[ZS_ALMOST_EMPTY];
-   if (page)
-   remove_zspage(page, class, ZS_ALMOST_EMPTY);
+   remove_zspage(page, class, i);
+   break;
+   }
 
return page;
 }
@@ -1706,9 +1712,6 @@ static unsigned long zs_can_compact(struct size_class 
*class)
 {
unsigned long obj_wasted;
 
-   if (!zs_stat_get(class, CLASS_ALMOST_EMPTY))
-   return 0;
-
obj_wasted = zs_stat_get(class, OBJ_ALLOCATED) -
zs_stat_get(class, OBJ_USED);
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-09 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (2):
  ASoC: Drop owner assignment from i2c_driver
  ASoC: Drop owner assignment from platform_driver

 sound/soc/codecs/adau1373.c   | 1 -
 sound/soc/codecs/adau1701.c   | 1 -
 sound/soc/codecs/adau1761-i2c.c   | 1 -
 sound/soc/codecs/adau1781-i2c.c   | 1 -
 sound/soc/codecs/adau1977-i2c.c   | 1 -
 sound/soc/codecs/adav803.c| 1 -
 sound/soc/codecs/ak4535.c | 1 -
 sound/soc/codecs/ak4641.c | 1 -
 sound/soc/codecs/ak4642.c | 1 -
 sound/soc/codecs/ak4671.c | 1 -
 sound/soc/codecs/alc5623.c| 1 -
 sound/soc/codecs/alc5632.c| 1 -
 sound/soc/codecs/cs35l32.c| 1 -
 sound/soc/codecs/cs4265.c | 1 -
 sound/soc/codecs/cs4270.c | 1 -
 sound/soc/codecs/cs4271-i2c.c | 1 -
 sound/soc/codecs/cs42l51-i2c.c| 1 -
 sound/soc/codecs/cs42l52.c| 1 -
 sound/soc/codecs/cs42l56.c| 1 -
 sound/soc/codecs/cs42l73.c| 1 -
 sound/soc/codecs/cs42xx8-i2c.c| 1 -
 sound/soc/codecs/da7210.c | 1 -
 sound/soc/codecs/da7213.c | 1 -
 sound/soc/codecs/da732x.c | 1 -
 sound/soc/codecs/da9055.c | 1 -
 sound/soc/codecs/isabelle.c   | 1 -
 sound/soc/codecs/lm4857.c | 1 -
 sound/soc/codecs/lm49453.c| 1 -
 sound/soc/codecs/max9768.c| 1 -
 sound/soc/codecs/max98088.c   | 1 -
 sound/soc/codecs/max98090.c   | 1 -
 sound/soc/codecs/max98095.c   | 1 -
 sound/soc/codecs/max9850.c| 1 -
 sound/soc/codecs/max9877.c| 1 -
 sound/soc/codecs/max98925.c   | 1 -
 sound/soc/codecs/ml26124.c| 1 -
 sound/soc/codecs/pcm1681.c| 1 -
 sound/soc/codecs/pcm512x-i2c.c| 1 -
 sound/soc/codecs/rt286.c  | 1 -
 sound/soc/codecs/rt5631.c | 1 -
 sound/soc/codecs/rt5640.c | 1 -
 sound/soc/codecs/rt5645.c | 1 -
 sound/soc/codecs/rt5651.c | 1 -
 sound/soc/codecs/rt5670.c | 1 -
 sound/soc/codecs/rt5677.c | 1 -
 sound/soc/codecs/sgtl5000.c   | 1 -
 sound/soc/codecs/ssm2518.c| 1 -
 sound/soc/codecs/ssm2602-i2c.c| 1 -
 sound/soc/codecs/ssm4567.c| 1 -
 sound/soc/codecs/sta32x.c | 1 -
 sound/soc/codecs/sta350.c | 1 -
 sound/soc/codecs/sta529.c | 1 -
 sound/soc/codecs/tas2552.c| 1 -
 sound/soc/codecs/tas5086.c| 1 -
 sound/soc/codecs/tfa9879.c| 1 -
 sound/soc/codecs/tlv320aic31xx.c  | 1 -
 sound/soc/codecs/tlv320aic32x4.c  | 1 -
 sound/soc/codecs/tlv320aic3x.c| 1 -
 sound/soc/codecs/tlv320dac33.c| 1 -
 sound/soc/codecs/tpa6130a2.c  | 1 -
 sound/soc/codecs/ts3a227e.c   | 1 -
 sound/soc/codecs/uda1380.c| 1 -
 sound/soc/codecs/wm1250-ev1.c | 1 -
 sound/soc/codecs/wm2000.c | 1 -
 sound/soc/codecs/wm2200.c | 1 -
 sound/soc/codecs/wm5100.c | 1 -
 sound/soc/codecs/wm8510.c | 1 -
 sound/soc/codecs/wm8523.c | 1 -
 sound/soc/codecs/wm8580.c | 1 -
 sound/soc/codecs/wm8711.c | 1 -
 sound/soc/codecs/wm8728.c | 1 -
 sound/soc/codecs/wm8731.c | 1 -
 sound/soc/codecs/wm8737.c | 1 -
 sound/soc/codecs/wm8741.c | 1 -
 sound/soc/codecs/wm8750.c | 1 -
 sound/soc/codecs/wm8753.c | 1 -
 sound/soc/codecs/wm8776.c | 1 -
 sound/soc/codecs/wm8804-i2c.c | 1 -
 sound/soc/codecs/wm8900.c | 1 -
 sound/soc/codecs/wm8903.c | 1 -
 sound/soc/codecs/wm8904.c | 1 -
 sound/soc/codecs/wm8940.c | 1 -
 sound/soc/codecs/wm8955.c | 1 -
 sound/soc/codecs/wm8960.c | 1 -
 sound/soc/codecs/wm8961.c | 1 -
 sound/soc/codecs/wm8962.c | 1 -
 sound/soc/codecs/wm8971.c | 1 -
 sound/soc/codecs/wm8974.c | 1 -
 sound/soc/codecs/wm8978.c | 1 -
 sound/soc/codecs/wm8983.c | 1 -
 sound/soc/codecs/wm8985.c | 1 -
 sound/soc/codecs/wm898

[PATCH 2/2] ASoC: Drop owner assignment from platform_driver

2015-07-09 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 sound/soc/mediatek/mt8173-max98090.c  | 1 -
 sound/soc/mediatek/mt8173-rt5650-rt5676.c | 1 -
 sound/soc/mediatek/mtk-afe-pcm.c  | 1 -
 3 files changed, 3 deletions(-)

diff --git a/sound/soc/mediatek/mt8173-max98090.c 
b/sound/soc/mediatek/mt8173-max98090.c
index 4d44b5803e55..6311f31fa669 100644
--- a/sound/soc/mediatek/mt8173-max98090.c
+++ b/sound/soc/mediatek/mt8173-max98090.c
@@ -193,7 +193,6 @@ MODULE_DEVICE_TABLE(of, mt8173_max98090_dt_match);
 static struct platform_driver mt8173_max98090_driver = {
.driver = {
   .name = "mt8173-max98090",
-  .owner = THIS_MODULE,
   .of_match_table = mt8173_max98090_dt_match,
 #ifdef CONFIG_PM
   .pm = &snd_soc_pm_ops,
diff --git a/sound/soc/mediatek/mt8173-rt5650-rt5676.c 
b/sound/soc/mediatek/mt8173-rt5650-rt5676.c
index 094055323059..4fd7dff15fe7 100644
--- a/sound/soc/mediatek/mt8173-rt5650-rt5676.c
+++ b/sound/soc/mediatek/mt8173-rt5650-rt5676.c
@@ -258,7 +258,6 @@ MODULE_DEVICE_TABLE(of, mt8173_rt5650_rt5676_dt_match);
 static struct platform_driver mt8173_rt5650_rt5676_driver = {
.driver = {
   .name = "mtk-rt5650-rt5676",
-  .owner = THIS_MODULE,
   .of_match_table = mt8173_rt5650_rt5676_dt_match,
 #ifdef CONFIG_PM
   .pm = &snd_soc_pm_ops,
diff --git a/sound/soc/mediatek/mtk-afe-pcm.c b/sound/soc/mediatek/mtk-afe-pcm.c
index 9863da73dfe0..de38d2e8ef91 100644
--- a/sound/soc/mediatek/mtk-afe-pcm.c
+++ b/sound/soc/mediatek/mtk-afe-pcm.c
@@ -1220,7 +1220,6 @@ static const struct dev_pm_ops mtk_afe_pm_ops = {
 static struct platform_driver mtk_afe_pcm_driver = {
.driver = {
   .name = "mtk-afe-pcm",
-  .owner = THIS_MODULE,
   .of_match_table = mtk_afe_pcm_dt_match,
   .pm = &mtk_afe_pm_ops,
},
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] ASoC: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski 

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 sound/soc/codecs/adau1373.c  | 1 -
 sound/soc/codecs/adau1701.c  | 1 -
 sound/soc/codecs/adau1761-i2c.c  | 1 -
 sound/soc/codecs/adau1781-i2c.c  | 1 -
 sound/soc/codecs/adau1977-i2c.c  | 1 -
 sound/soc/codecs/adav803.c   | 1 -
 sound/soc/codecs/ak4535.c| 1 -
 sound/soc/codecs/ak4641.c| 1 -
 sound/soc/codecs/ak4642.c| 1 -
 sound/soc/codecs/ak4671.c| 1 -
 sound/soc/codecs/alc5623.c   | 1 -
 sound/soc/codecs/alc5632.c   | 1 -
 sound/soc/codecs/cs35l32.c   | 1 -
 sound/soc/codecs/cs4265.c| 1 -
 sound/soc/codecs/cs4270.c| 1 -
 sound/soc/codecs/cs4271-i2c.c| 1 -
 sound/soc/codecs/cs42l51-i2c.c   | 1 -
 sound/soc/codecs/cs42l52.c   | 1 -
 sound/soc/codecs/cs42l56.c   | 1 -
 sound/soc/codecs/cs42l73.c   | 1 -
 sound/soc/codecs/cs42xx8-i2c.c   | 1 -
 sound/soc/codecs/da7210.c| 1 -
 sound/soc/codecs/da7213.c| 1 -
 sound/soc/codecs/da732x.c| 1 -
 sound/soc/codecs/da9055.c| 1 -
 sound/soc/codecs/isabelle.c  | 1 -
 sound/soc/codecs/lm4857.c| 1 -
 sound/soc/codecs/lm49453.c   | 1 -
 sound/soc/codecs/max9768.c   | 1 -
 sound/soc/codecs/max98088.c  | 1 -
 sound/soc/codecs/max98090.c  | 1 -
 sound/soc/codecs/max98095.c  | 1 -
 sound/soc/codecs/max9850.c   | 1 -
 sound/soc/codecs/max9877.c   | 1 -
 sound/soc/codecs/max98925.c  | 1 -
 sound/soc/codecs/ml26124.c   | 1 -
 sound/soc/codecs/pcm1681.c   | 1 -
 sound/soc/codecs/pcm512x-i2c.c   | 1 -
 sound/soc/codecs/rt286.c | 1 -
 sound/soc/codecs/rt5631.c| 1 -
 sound/soc/codecs/rt5640.c| 1 -
 sound/soc/codecs/rt5645.c| 1 -
 sound/soc/codecs/rt5651.c| 1 -
 sound/soc/codecs/rt5670.c| 1 -
 sound/soc/codecs/rt5677.c| 1 -
 sound/soc/codecs/sgtl5000.c  | 1 -
 sound/soc/codecs/ssm2518.c   | 1 -
 sound/soc/codecs/ssm2602-i2c.c   | 1 -
 sound/soc/codecs/ssm4567.c   | 1 -
 sound/soc/codecs/sta32x.c| 1 -
 sound/soc/codecs/sta350.c| 1 -
 sound/soc/codecs/sta529.c| 1 -
 sound/soc/codecs/tas2552.c   | 1 -
 sound/soc/codecs/tas5086.c   | 1 -
 sound/soc/codecs/tfa9879.c   | 1 -
 sound/soc/codecs/tlv320aic31xx.c | 1 -
 sound/soc/codecs/tlv320aic32x4.c | 1 -
 sound/soc/codecs/tlv320aic3x.c   | 1 -
 sound/soc/codecs/tlv320dac33.c   | 1 -
 sound/soc/codecs/tpa6130a2.c | 1 -
 sound/soc/codecs/ts3a227e.c  | 1 -
 sound/soc/codecs/uda1380.c   | 1 -
 sound/soc/codecs/wm1250-ev1.c| 1 -
 sound/soc/codecs/wm2000.c| 1 -
 sound/soc/codecs/wm2200.c| 1 -
 sound/soc/codecs/wm5100.c| 1 -
 sound/soc/codecs/wm8510.c| 1 -
 sound/soc/codecs/wm8523.c| 1 -
 sound/soc/codecs/wm8580.c| 1 -
 sound/soc/codecs/wm8711.c| 1 -
 sound/soc/codecs/wm8728.c| 1 -
 sound/soc/codecs/wm8731.c| 1 -
 sound/soc/codecs/wm8737.c| 1 -
 sound/soc/codecs/wm8741.c| 1 -
 sound/soc/codecs/wm8750.c| 1 -
 sound/soc/codecs/wm8753.c| 1 -
 sound/soc/codecs/wm8776.c| 1 -
 sound/soc/codecs/wm8804-i2c.c| 1 -
 sound/soc/codecs/wm8900.c| 1 -
 sound/soc/codecs/wm8903.c| 1 -
 sound/soc/codecs/wm8904.c| 1 -
 sound/soc/codecs/wm8940.c| 1 -
 sound/soc/codecs/wm8955.c| 1 -
 sound/soc/codecs/wm8960.c| 1 -
 sound/soc/codecs/wm8961.c| 1 -
 sound/soc/codecs/wm8962.c| 1 -
 sound/soc/codecs/wm8971.c| 1 -
 sound/soc/codecs/wm8974.c| 1 -
 sound/soc/codecs/wm8978.c| 1 -
 sound/soc/codecs/wm8983.c| 1 -
 sound/soc/codecs/wm8985.c| 1 -
 sound/soc/codecs/wm8988.c| 1 -
 sound/soc/codecs/wm8990.c| 1 -
 sound/soc/codecs/wm8991.c| 1 -
 sound/soc/codecs/wm8993.c| 1 -
 sound/soc/codecs/wm8995.c| 1 -
 sound/soc/codecs/wm8996.c| 1 -
 sound/soc/codecs/wm9081.c| 1 -
 sound/soc/codecs/wm9090.c| 1 -
 99 files changed, 99 deletions(-)

diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index a43160254929..6c96860f46de 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -1534,7 +1534,6 @@ MODULE_DEVICE_TABLE(i2c, adau1373_i2c_id);
 static struct i2c_driver adau1373_i2c_driver = {
.driver = {
.name = "adau1373",
-   .owner = THIS_MODULE,
},
.probe = adau1373_i2c_probe,
.remove = adau1373_i2c_remove,
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index ff7f846e3b76..de53c0d7bf10 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -915,7 +915,6 @@ MODULE_DEVICE_TABLE(i2c, adau1701_i2c_id);
 static struct i2c_driver adau1701_i2c_d

RE: [RFC] genalloc:add an gen_pool_alloc_align func to genalloc

2015-07-09 Thread Zhao Qiang



> -Original Message-
> From: Wood Scott-B07421
> Sent: Friday, July 10, 2015 6:20 AM
> To: Zhao Qiang-B45475
> Cc: lau...@codeaurora.org; linux-kernel@vger.kernel.org; linuxppc-
> d...@lists.ozlabs.org; a...@linux-foundation.org; o...@lixom.net;
> catalin.mari...@arm.com; Xie Xiaobo-R63061
> Subject: Re: [RFC] genalloc:add an gen_pool_alloc_align func to genalloc
> 
> On Thu, 2015-07-09 at 15:47 +0800, Zhao Qiang wrote:
> > @@ -541,13 +562,14 @@ EXPORT_SYMBOL(gen_pool_first_fit_order_align);
> >   * which we can allocate the memory.
> >   */
> >  unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
> > - unsigned long start, unsigned int nr, void *data)
> > + unsigned long start, unsigned int nr,
> > + void *data, unsigned long align_mask)
> >  {
> >   unsigned long start_bit = size;
> >   unsigned long len = size + 1;
> >   unsigned long index;
> >
> > - index = bitmap_find_next_zero_area(map, size, start, nr, 0);
> > + index = bitmap_find_next_zero_area(map, size, start, nr,
> align_mask);
> >
> >   while (index < size) {
> >   int next_bit = find_next_bit(map, size, index + nr);
> 
> What about the other call to bitmap_find_next_zero_area()?

All others will pass the align_mask to bitmap_find_next_zero_area.

> 
> -Scott



  1   2   3   4   5   6   7   8   9   >