Re: [PATCH v2] srcu: Isolate srcu sections using CONFIG_SRCU

2015-01-04 Thread Michael Ellerman
On Tue, 2014-12-30 at 13:54 -0500, Pranith Kumar wrote:
> On Tue, Dec 30, 2014 at 1:50 PM, Peter Zijlstra  wrote:
> > On Tue, Dec 30, 2014 at 12:46:22AM -0500, Pranith Kumar wrote:
> >> Isolate the SRCU functions and data structures within CONFIG_SRCU so that 
> >> there
> >> is a compile time failure if srcu is used when not enabled. This was 
> >> decided to
> >> be better than waiting until link time for a failure to occur.
> >
> > Why?
> 
> This is part of the kernel tinification efforts. The first patch was
> posted here: https://lkml.org/lkml/2014/12/4/848. This patch enables a
> compile time failure instead of a link time failure.

The punch line was:

  "so the savings are about ~2000 bytes."

Which is utterly not worth the effort IMO. There have got to be more attractive
targets for tinification than this.

cheers



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 9/13] ALSA: i2sbus: Delete an unnecessary check before the function call "snd_pcm_suspend_all"

2015-01-04 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 3 Jan 2015 20:43:01 +0100

The snd_pcm_suspend_all() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 sound/aoa/soundbus/i2sbus/core.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 4e2b4fb..837ba99 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -381,10 +381,8 @@ static int i2sbus_suspend(struct macio_dev* dev, 
pm_message_t state)
 
list_for_each_entry(i2sdev, &control->list, item) {
/* Notify Alsa */
-   if (i2sdev->sound.pcm) {
-   /* Suspend PCM streams */
-   snd_pcm_suspend_all(i2sdev->sound.pcm);
-   }
+   /* Suspend PCM streams */
+   snd_pcm_suspend_all(i2sdev->sound.pcm);
 
/* Notify codecs */
list_for_each_entry(cii, &i2sdev->sound.codec_list, list) {
-- 
2.2.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 11/13] ALSA: Deletion of checks before the function call "iounmap"

2015-01-04 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 3 Jan 2015 22:55:54 +0100

The iounmap() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 sound/aoa/soundbus/i2sbus/core.c | 13 ++---
 sound/arm/aaci.c |  4 ++--
 sound/drivers/ml403-ac97cr.c |  3 +--
 sound/isa/msnd/msnd_pinnacle.c   |  3 +--
 sound/parisc/harmony.c   |  4 +---
 sound/pci/ad1889.c   |  5 +
 sound/pci/asihpi/hpioctl.c   |  6 ++
 sound/pci/atiixp.c   |  3 +--
 sound/pci/atiixp_modem.c |  3 +--
 sound/pci/aw2/aw2-alsa.c |  4 +---
 sound/pci/bt87x.c|  3 +--
 sound/pci/cs4281.c   |  6 ++
 sound/pci/cs46xx/cs46xx_lib.c|  4 ++--
 sound/pci/ctxfi/cthw20k1.c   |  5 +
 sound/pci/ctxfi/cthw20k2.c   |  5 +
 sound/pci/echoaudio/echoaudio.c  |  6 +-
 sound/pci/hda/hda_intel.c|  3 +--
 sound/pci/lola/lola.c|  6 ++
 sound/pci/mixart/mixart.c|  7 +++
 sound/pci/nm256/nm256.c  |  6 ++
 sound/pci/rme9652/hdsp.c |  4 +---
 sound/pci/rme9652/hdspm.c|  4 +---
 sound/pci/rme9652/rme9652.c  |  3 +--
 sound/pci/sis7019.c  |  5 +
 sound/pci/ymfpci/ymfpci_main.c   |  3 +--
 sound/ppc/pmac.c | 15 +--
 26 files changed, 43 insertions(+), 90 deletions(-)

diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 4e2b4fb..7835045 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -74,10 +74,9 @@ static void i2sbus_release_dev(struct device *dev)
int i;
 
i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev);
-
-   if (i2sdev->intfregs) iounmap(i2sdev->intfregs);
-   if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma);
-   if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma);
+   iounmap(i2sdev->intfregs);
+   iounmap(i2sdev->out.dbdma);
+   iounmap(i2sdev->in.dbdma);
for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++)
release_and_free_resource(i2sdev->allocated_resource[i]);
free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring);
@@ -318,9 +317,9 @@ static int i2sbus_add_dev(struct macio_dev *macio,
free_irq(dev->interrupts[i], dev);
free_dbdma_descriptor_ring(dev, &dev->out.dbdma_ring);
free_dbdma_descriptor_ring(dev, &dev->in.dbdma_ring);
-   if (dev->intfregs) iounmap(dev->intfregs);
-   if (dev->out.dbdma) iounmap(dev->out.dbdma);
-   if (dev->in.dbdma) iounmap(dev->in.dbdma);
+   iounmap(dev->intfregs);
+   iounmap(dev->out.dbdma);
+   iounmap(dev->in.dbdma);
for (i=0;i<3;i++)
release_and_free_resource(dev->allocated_resource[i]);
mutex_destroy(&dev->lock);
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 0e83a73..4140b1b 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -889,8 +889,8 @@ static int aaci_probe_ac97(struct aaci *aaci)
 static void aaci_free_card(struct snd_card *card)
 {
struct aaci *aaci = card->private_data;
-   if (aaci->base)
-   iounmap(aaci->base);
+
+   iounmap(aaci->base);
 }
 
 static struct aaci *aaci_init_card(struct amba_device *dev)
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
index ec01de1..bdcb572 100644
--- a/sound/drivers/ml403-ac97cr.c
+++ b/sound/drivers/ml403-ac97cr.c
@@ -1094,8 +1094,7 @@ static int snd_ml403_ac97cr_free(struct snd_ml403_ac97cr 
*ml403_ac97cr)
if (ml403_ac97cr->capture_irq >= 0)
free_irq(ml403_ac97cr->capture_irq, ml403_ac97cr);
/* give back "port" */
-   if (ml403_ac97cr->port != NULL)
-   iounmap(ml403_ac97cr->port);
+   iounmap(ml403_ac97cr->port);
kfree(ml403_ac97cr);
PDEBUG(INIT_INFO, "free(): (done)\n");
return 0;
diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
index 65b3682..4c07266 100644
--- a/sound/isa/msnd/msnd_pinnacle.c
+++ b/sound/isa/msnd/msnd_pinnacle.c
@@ -627,8 +627,7 @@ static int snd_msnd_attach(struct snd_card *card)
return 0;
 
 err_release_region:
-   if (chip->mappedbase)
-   iounmap(chip->mappedbase);
+   iounmap(chip->mappedbase);
release_mem_region(chip->base, BUFFSIZE);
release_region(chip->io, DSP_NUMIO);
free_irq(chip->irq, chip);
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index 29604a2..f2350c1 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -893,9 +893,7 @@ snd_harmony_free(struct snd_harmony *h)
if (h->irq >= 0)
free_irq(h->irq, h);
 
-   if (h->iobase)
-   iounmap(h->iobase);
-
+   iounmap(h->iobase);
kfree(h);
return 0;
 }
diff --git a/soun

Re: [PATCH v2] srcu: Isolate srcu sections using CONFIG_SRCU

2015-01-04 Thread Paul E. McKenney
On Sun, Jan 04, 2015 at 08:35:52PM +1100, Michael Ellerman wrote:
> On Tue, 2014-12-30 at 13:54 -0500, Pranith Kumar wrote:
> > On Tue, Dec 30, 2014 at 1:50 PM, Peter Zijlstra  
> > wrote:
> > > On Tue, Dec 30, 2014 at 12:46:22AM -0500, Pranith Kumar wrote:
> > >> Isolate the SRCU functions and data structures within CONFIG_SRCU so 
> > >> that there
> > >> is a compile time failure if srcu is used when not enabled. This was 
> > >> decided to
> > >> be better than waiting until link time for a failure to occur.
> > >
> > > Why?
> > 
> > This is part of the kernel tinification efforts. The first patch was
> > posted here: https://lkml.org/lkml/2014/12/4/848. This patch enables a
> > compile time failure instead of a link time failure.
> 
> The punch line was:
> 
>   "so the savings are about ~2000 bytes."
> 
> Which is utterly not worth the effort IMO. There have got to be more 
> attractive
> targets for tinification than this.

There probably are.  But if the tinification effort is to come anywhere
near reaching its goals, it is going to need 2000-byte savings, especially
on the small systems that are this effort's main target.

That said, Peter's suggestion of falling back to the link-time diagnostic
does simplify things a bit, and might be a good approach.

Thanx, Paul

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2] srcu: Isolate srcu sections using CONFIG_SRCU

2015-01-04 Thread Josh Triplett

Message-ID: 

On January 4, 2015 8:14:16 AM PST, "Paul E. McKenney" 
 wrote:
>On Sun, Jan 04, 2015 at 08:35:52PM +1100, Michael Ellerman wrote:
>> On Tue, 2014-12-30 at 13:54 -0500, Pranith Kumar wrote:
>> > On Tue, Dec 30, 2014 at 1:50 PM, Peter Zijlstra
> wrote:
>> > > On Tue, Dec 30, 2014 at 12:46:22AM -0500, Pranith Kumar wrote:
>> > >> Isolate the SRCU functions and data structures within
>CONFIG_SRCU so that there
>> > >> is a compile time failure if srcu is used when not enabled. This
>was decided to
>> > >> be better than waiting until link time for a failure to occur.
>> > >
>> > > Why?
>> > 
>> > This is part of the kernel tinification efforts. The first patch
>was
>> > posted here: https://lkml.org/lkml/2014/12/4/848. This patch
>enables a
>> > compile time failure instead of a link time failure.
>> 
>> The punch line was:
>> 
>>   "so the savings are about ~2000 bytes."
>> 
>> Which is utterly not worth the effort IMO. There have got to be more
>attractive
>> targets for tinification than this.
>
>There probably are.  But if the tinification effort is to come anywhere
>near reaching its goals, it is going to need 2000-byte savings,
>especially
>on the small systems that are this effort's main target.
>
>That said, Peter's suggestion of falling back to the link-time
>diagnostic
>does simplify things a bit, and might be a good approach.

Agreed on both fronts; I don't think we should add any significant complexity 
just to turn link errors into compile errors.

- Josh Triplett

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[git pull] Please pull mpe/linux.git powerpc-3.19-3 tag

2015-01-04 Thread Michael Ellerman
Hi Linus,

Please pull some powerpc fixes for 3.19:

The following changes since commit b7392d2247cfe6771f95d256374f1a8e6a6f48d6:

  Linux 3.19-rc2 (2014-12-28 16:49:37 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux.git 
tags/powerpc-3.19-3

for you to fetch changes up to 1be6f10f6f9caade3a053938cb80a2eed237e262:

  Revert "powerpc: Secondary CPUs must set cpu_callin_map after setting active 
and online" (2014-12-29 15:51:51 +1100)


powerpc fixes for 3.19

Wire up sys_execveat(). Tested on 32 & 64 bit.

Fix for kdump on LE systems with cpus hot unplugged.

Revert Anton's fix for "kernel BUG at kernel/smpboot.c:134!", this broke other
platforms, we'll do a proper fix for 3.20.


Hari Bathini (1):
  powerpc/kdump: Ignore failure in enabling big endian exception during 
crash

Michael Ellerman (1):
  Revert "powerpc: Secondary CPUs must set cpu_callin_map after setting 
active and online"

Pranith Kumar (1):
  powerpc: Wire up sys_execveat() syscall

 arch/powerpc/include/asm/kexec.h   | 10 ++
 arch/powerpc/include/asm/systbl.h  |  1 +
 arch/powerpc/include/asm/unistd.h  |  2 +-
 arch/powerpc/include/uapi/asm/unistd.h |  1 +
 arch/powerpc/kernel/machine_kexec_64.c |  2 +-
 arch/powerpc/kernel/smp.c  |  9 +
 arch/powerpc/platforms/pseries/lpar.c  |  8 +++-
 7 files changed, 22 insertions(+), 11 deletions(-)




signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev