mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kmemcheck: correctly remove kmemcheck call from dma_map_sg_attrs
@ 2017-10-12 19:22 Levin, Alexander (Sasha Levin)
  2017-10-13  7:11 ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-12 19:22 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, mhocko, Levin, Alexander (Sasha Levin)

We have missed removing some code as part of removing the kmemcheck
hooks.

Unfourtenatly this got missed during my review, and the code was
still building.

Reported-by: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 include/linux/dma-mapping.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 83f3ab31efc4..2911389bc147 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -260,10 +260,8 @@ static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
 				   unsigned long attrs)
 {
 	const struct dma_map_ops *ops = get_dma_ops(dev);
-	int i, ents;
-	struct scatterlist *s;
+	int ents;
 
-	for_each_sg(sg, s, nents, i)
 	BUG_ON(!valid_dma_direction(dir));
 	ents = ops->map_sg(dev, sg, nents, dir, attrs);
 	BUG_ON(ents < 0);
-- 
2.11.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kmemcheck: correctly remove kmemcheck call from dma_map_sg_attrs
  2017-10-12 19:22 [PATCH] kmemcheck: correctly remove kmemcheck call from dma_map_sg_attrs Levin, Alexander (Sasha Levin)
@ 2017-10-13  7:11 ` Michal Hocko
  2017-10-13 14:05   ` Levin, Alexander (Sasha Levin)
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2017-10-13  7:11 UTC (permalink / raw)
  To: Levin, Alexander (Sasha Levin); +Cc: akpm, linux-kernel

On Thu 12-10-17 19:22:05, Sasha Levin wrote:
> We have missed removing some code as part of removing the kmemcheck
> hooks.
> 
> Unfourtenatly this got missed during my review, and the code was
> still building.
> 
> Reported-by: Michal Hocko <mhocko@kernel.org>
> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>

Yes this would be the proper fix for the specific issue I have noticed.
There might be others I haven't even checked. Really the only way to
make this chage is to post a reproducible steps to regenerate your diff
and review that the used scripts are correct. Follow up fixes are not a
way to go

> ---
>  include/linux/dma-mapping.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
> index 83f3ab31efc4..2911389bc147 100644
> --- a/include/linux/dma-mapping.h
> +++ b/include/linux/dma-mapping.h
> @@ -260,10 +260,8 @@ static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
>  				   unsigned long attrs)
>  {
>  	const struct dma_map_ops *ops = get_dma_ops(dev);
> -	int i, ents;
> -	struct scatterlist *s;
> +	int ents;
>  
> -	for_each_sg(sg, s, nents, i)
>  	BUG_ON(!valid_dma_direction(dir));
>  	ents = ops->map_sg(dev, sg, nents, dir, attrs);
>  	BUG_ON(ents < 0);
> -- 
> 2.11.0

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kmemcheck: correctly remove kmemcheck call from dma_map_sg_attrs
  2017-10-13  7:11 ` Michal Hocko
@ 2017-10-13 14:05   ` Levin, Alexander (Sasha Levin)
  0 siblings, 0 replies; 3+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-13 14:05 UTC (permalink / raw)
  To: Michal Hocko; +Cc: akpm, linux-kernel

On Fri, Oct 13, 2017 at 09:11:21AM +0200, Michal Hocko wrote:
>On Thu 12-10-17 19:22:05, Sasha Levin wrote:
>> We have missed removing some code as part of removing the kmemcheck
>> hooks.
>>
>> Unfourtenatly this got missed during my review, and the code was
>> still building.
>>
>> Reported-by: Michal Hocko <mhocko@kernel.org>
>> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
>
>Yes this would be the proper fix for the specific issue I have noticed.
>There might be others I haven't even checked. Really the only way to
>make this chage is to post a reproducible steps to regenerate your diff
>and review that the used scripts are correct. Follow up fixes are not a
>way to go

So the only part of this series that was scripted to some extend was
this commit we're looking at. The 3 other commits are done manually
(although their large size is mostly attributed to 'git rm').

Even for this commit, I don't see a way to have it completely scripted
given that we're not simply removing calls.

I've looked at the ~50 deletions of kmemcheck calls in this commit to
make sure they make sense.

-- 

Thanks,
Sasha

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-13 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12 19:22 [PATCH] kmemcheck: correctly remove kmemcheck call from dma_map_sg_attrs Levin, Alexander (Sasha Levin)
2017-10-13  7:11 ` Michal Hocko
2017-10-13 14:05   ` Levin, Alexander (Sasha Levin)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®