Skip to contentSkip to conversation

Minor updates for PS3

PATCH Applied Geoff Levand 5 participants 10 messages Aug 7, 2017 – Aug 18, 2017

Subsystems (4)
lore
Share & tools
lore

Geoff Levand

author maintainer
#0 lore raw

cover Minor updates for PS3

Hi Michael,

A few very minor updates for PS3. Please apply.

-Geoff

The following changes since commit aae4e7a8bc44722fe70d58920a36916b1043195e:

Linux 4.13-rc4 (2017-08-06 18:44:49 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-powerpc

for you to fetch changes up to 1c2ef56f08fcfcf74aa281c33363197f8c01e5ab:

powerpc/ps3: Refresh ps3_defconfig (2017-08-07 12:49:07 -0700)

----------------------------------------------------------------
Geoff Levand (2):
block/ps3vram: Check return of ps3vram_cache_init powerpc/ps3: Refresh ps3_defconfig

Markus Elfring (1):
block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

 arch/powerpc/configs/ps3_defconfig |  2 --
 drivers/block/ps3vram.c            | 10 ++++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 1/3 block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

From: Markus Elfring <[email protected]>

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/block/ps3vram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/block/ps3vram.c +1 -3
index e0e81cacd781..ba97d037279e 100644
@@ -409,10 +409,8 @@ static int ps3vram_cache_init(struct ps3_system_bus_device *dev)
 	priv->cache.page_size = CACHE_PAGE_SIZE;
 	priv->cache.tags = kzalloc(sizeof(struct ps3vram_tag) *
 				   CACHE_PAGE_COUNT, GFP_KERNEL);
-	if (priv->cache.tags == NULL) {
-		dev_err(&dev->core, "Could not allocate cache tags\n");
+	if (!priv->cache.tags)
 		return -ENOMEM;
-	}
 
 	dev_info(&dev->core, "Created ram cache: %d entries, %d KiB each\n",
 		CACHE_PAGE_COUNT, CACHE_PAGE_SIZE / 1024);
Signature · 1 line
2.11.0
author maintainer
#3 lore raw

PATCH 2/3 block/ps3vram: Check return of ps3vram_cache_init

In reply to Geoff Levand
Cc Markus Elfring <[email protected]>
Cc Jim Paris <[email protected]>
Cc Jens Axboe <[email protected]>
---
 drivers/block/ps3vram.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/block/ps3vram.c +5 -1
index ba97d037279e..6a55959cbf78 100644
@@ -741,7 +741,11 @@ static int ps3vram_probe(struct ps3_system_bus_device *dev)
 		goto out_unmap_reports;
 	}
 
-	ps3vram_cache_init(dev);
+	error = ps3vram_cache_init(dev);
+	if (error < 0) {
+		goto out_unmap_reports;
+	}
+
 	ps3vram_proc_init(dev);
 
 	queue = blk_alloc_queue(GFP_KERNEL);
Signature · 1 line
2.11.0
author maintainer
#6 lore raw

PATCH 3/3 powerpc/ps3: Refresh ps3_defconfig

In reply to Geoff Levand
---
 arch/powerpc/configs/ps3_defconfig | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/configs/ps3_defconfig +0 -2
index ee0ec5a682fc..378382683180 100644
@@ -5,7 +5,6 @@ CONFIG_SMP=y
 CONFIG_NR_CPUS=2
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
-CONFIG_FHANDLE=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -94,7 +93,6 @@ CONFIG_USB_USBNET=m
 # CONFIG_USB_NET_CDC_SUBSET is not set
 # CONFIG_USB_NET_ZAURUS is not set
 CONFIG_INPUT_FF_MEMLESS=m
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 CONFIG_INPUT_JOYDEV=m
 CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_KEYBOARD is not set
Signature · 1 line
2.11.0
#7 lore raw
In reply to Geoff Levand
Quoted 3 lines · Geoff Levand

Hi Michael,

A few very minor updates for PS3. Please apply.

Jens do you want to take the block ones, or should I just take the lot?

cheers

#4 lore raw

Re: block/ps3vram: Check return of ps3vram_cache_init

In reply to Geoff Levand

drivers/block/ps3vram.c static int ps3vram_probe(struct ps3_system_bus_device *dev) · line 751

Quoted 13 lines
drivers/block/ps3vram.c +5 -1
@@ -741,7 +741,11 @@ static int ps3vram_probe(struct ps3_system_bus_device *dev)
 		goto out_unmap_reports;
 	}
 
-	ps3vram_cache_init(dev);
+	error = ps3vram_cache_init(dev);
+	if (error < 0) {
+		goto out_unmap_reports;
+	}
+
 	ps3vram_proc_init(dev);
 
 	queue = blk_alloc_queue(GFP_KERNEL);

I pointed a few development concerns out.
https://patchwork.ozlabs.org/patch/798575/

Will the commit subject “block/ps3vram: Check return value of ps3vram_cache_init()” be more appropriate?

Regards,
Markus

maintainer
#8 lore raw
In reply to Michael Ellerman
Quoted 7 lines · Michael Ellerman
Quoted 3 lines · Geoff Levand

Hi Michael,

A few very minor updates for PS3. Please apply.

Jens do you want to take the block ones, or should I just take the lot?

Up to you, I'm fine either way.

Signature · 1 line
Jens Axboe
#9 lore raw
Quoted 10 lines · Jens Axboe
Quoted 7 lines · Michael Ellerman
Quoted 3 lines · Geoff Levand

Hi Michael,

A few very minor updates for PS3. Please apply.

Jens do you want to take the block ones, or should I just take the lot?

Up to you, I'm fine either way.

OK I'll grab them.

cheers

#2 lore raw

Re: [1/3] block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

In reply to Geoff Levand
Quoted 4 lines · Geoff Levand

From: Markus Elfring <[email protected]>

Omit an extra message for a memory allocation failure in this function.

Quoted 8 lines

This issue was detected by using the Coccinelle software.

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/fd1335e048a961ef63f7da1a0c8f39

cheers