[PATCH] platform/surface: clean up a variable in surface_dtx_read()

Subsystems: microsoft surface dtx driver, microsoft surface hardware platform support, the rest

STALE2019d

3 messages, 3 authors, 2021-04-07 · open the first message on its own page

[PATCH] platform/surface: clean up a variable in surface_dtx_read()

From: Dan Carpenter <hidden>
Date: 2021-03-26 12:30:08

The "&client->ddev->lock" and "&ddev->lock" are the same thing.  Let's
use "&ddev->lock" consistently.

Signed-off-by: Dan Carpenter <redacted>
---
 drivers/platform/surface/surface_dtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/surface/surface_dtx.c b/drivers/platform/surface/surface_dtx.c
index 1fedacf74050..63ce587e79e3 100644
--- a/drivers/platform/surface/surface_dtx.c
+++ b/drivers/platform/surface/surface_dtx.c
@@ -487,7 +487,7 @@ static ssize_t surface_dtx_read(struct file *file, char __user *buf, size_t coun
 			if (status < 0)
 				return status;
 
-			if (down_read_killable(&client->ddev->lock))
+			if (down_read_killable(&ddev->lock))
 				return -ERESTARTSYS;
 
 			/* Need to check that we're not shut down again. */
-- 
2.30.2

Re: [PATCH] platform/surface: clean up a variable in surface_dtx_read()

From: Maximilian Luz <luzmaximilian@gmail.com>
Date: 2021-03-26 14:07:17

On 3/26/21 1:28 PM, Dan Carpenter wrote:
The "&client->ddev->lock" and "&ddev->lock" are the same thing.  Let's
use "&ddev->lock" consistently.

Signed-off-by: Dan Carpenter <redacted>
Good catch, thanks!

Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
quoted hunk
---
  drivers/platform/surface/surface_dtx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/surface/surface_dtx.c b/drivers/platform/surface/surface_dtx.c
index 1fedacf74050..63ce587e79e3 100644
--- a/drivers/platform/surface/surface_dtx.c
+++ b/drivers/platform/surface/surface_dtx.c
@@ -487,7 +487,7 @@ static ssize_t surface_dtx_read(struct file *file, char __user *buf, size_t coun
  			if (status < 0)
  				return status;
  
-			if (down_read_killable(&client->ddev->lock))
+			if (down_read_killable(&ddev->lock))
  				return -ERESTARTSYS;
  
  			/* Need to check that we're not shut down again. */

Re: [PATCH] platform/surface: clean up a variable in surface_dtx_read()

From: Hans de Goede <hidden>
Date: 2021-04-07 11:25:42

Hi,

On 3/26/21 3:06 PM, Maximilian Luz wrote:
On 3/26/21 1:28 PM, Dan Carpenter wrote:
quoted
The "&client->ddev->lock" and "&ddev->lock" are the same thing.  Let's
use "&ddev->lock" consistently.

Signed-off-by: Dan Carpenter <redacted>
Good catch, thanks!

Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Thank you for the review, I've merged this now:

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


quoted
---
  drivers/platform/surface/surface_dtx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/surface/surface_dtx.c b/drivers/platform/surface/surface_dtx.c
index 1fedacf74050..63ce587e79e3 100644
--- a/drivers/platform/surface/surface_dtx.c
+++ b/drivers/platform/surface/surface_dtx.c
@@ -487,7 +487,7 @@ static ssize_t surface_dtx_read(struct file *file, char __user *buf, size_t coun
              if (status < 0)
                  return status;
  -            if (down_read_killable(&client->ddev->lock))
+            if (down_read_killable(&ddev->lock))
                  return -ERESTARTSYS;
                /* Need to check that we're not shut down again. */

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help