public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: Thomas Meyer <thomas@m3y3r.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Use resource_size()
Date: Wed, 03 Aug 2011 11:36:04 +0000	[thread overview]
Message-ID: <4E3932A4.7030101@grupopie.com> (raw)
In-Reply-To: <1312303347.2629.17.camel@localhost.localdomain>

Thomas Meyer wrote:
>  Use resource_size function on resource object
>  instead of explicit computation.
> 
>  The semantic patch that makes this output is available
>  in scripts/coccinelle/api/resource_size.cocci.
> 
>  More information about semantic patching is available at
>  http://coccinelle.lip6.fr/
> 

[...]

> diff -u -p a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c
> --- a/drivers/xen/xen-pciback/conf_space_header.c 2011-07-26 00:46:09.730171570 +0200
> +++ b/drivers/xen/xen-pciback/conf_space_header.c 2011-08-01 23:02:39.180421787 +0200
> @@ -187,7 +187,7 @@ static inline void read_dev_bar(struct p
>  
>  	bar_info->val = res[pos].start |
>  			(res[pos].flags & PCI_REGION_FLAG_MASK);
> -	bar_info->len_val = res[pos].end - res[pos].start + 1;
> +	bar_info->len_val = resource_size(res);

I didn't look at the code around this, but looking just at the patch,
this seems like it should be:

bar_info->len_val = resource_size(&res[pos]);

or something like that...

-- 
Paulo Marques - www.grupopie.com

"As far as we know, our computer has never had an undetected error."
Weisert

      parent reply	other threads:[~2011-08-03 11:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 16:42 [PATCH] Use resource_size() Thomas Meyer
2011-08-03  6:50 ` Tobias Klauser
2011-08-03 11:36 ` Paulo Marques [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E3932A4.7030101@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@m3y3r.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox