Re: [PATCH] cxl: no need to check return value of debugfs_create functions

2019-06-12 Thread Greg Kroah-Hartman
On Wed, Jun 12, 2019 at 11:51:21AM +0200, Arnd Bergmann wrote: > On Tue, Jun 11, 2019 at 8:13 PM Greg Kroah-Hartman > wrote: > > > @@ -64,8 +64,6 @@ int cxl_debugfs_adapter_add(struct cxl *adapter) > > > > snprintf(buf, 32, "card%i", adapter->adapter_num); > > dir = debugfs_create

Re: [PATCH] cxl: no need to check return value of debugfs_create functions

2019-06-12 Thread Frederic Barrat
Le 12/06/2019 à 12:02, Greg Kroah-Hartman a écrit : On Wed, Jun 12, 2019 at 11:51:21AM +0200, Arnd Bergmann wrote: On Tue, Jun 11, 2019 at 8:13 PM Greg Kroah-Hartman wrote: @@ -64,8 +64,6 @@ int cxl_debugfs_adapter_add(struct cxl *adapter) snprintf(buf, 32, "card%i", adapter->ada

Re: [PATCH] cxl: no need to check return value of debugfs_create functions

2019-06-12 Thread Greg Kroah-Hartman
On Wed, Jun 12, 2019 at 11:51:21AM +0200, Arnd Bergmann wrote: > On Tue, Jun 11, 2019 at 8:13 PM Greg Kroah-Hartman > wrote: > > > @@ -64,8 +64,6 @@ int cxl_debugfs_adapter_add(struct cxl *adapter) > > > > snprintf(buf, 32, "card%i", adapter->adapter_num); > > dir = debugfs_create

Re: [PATCH] cxl: no need to check return value of debugfs_create functions

2019-06-12 Thread Arnd Bergmann
On Tue, Jun 11, 2019 at 8:13 PM Greg Kroah-Hartman wrote: > @@ -64,8 +64,6 @@ int cxl_debugfs_adapter_add(struct cxl *adapter) > > snprintf(buf, 32, "card%i", adapter->adapter_num); > dir = debugfs_create_dir(buf, cxl_debugfs); > - if (IS_ERR(dir)) > - return P

[PATCH] cxl: no need to check return value of debugfs_create functions

2019-06-11 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because there's no need to check, also make the return value of the local debugfs_create_io_x64() call void, as no o