+ resource-constify-arg-to-resource_size-and-resource_type.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     resource: constify arg to resource_size() and resource_type()
has been added to the -mm tree.  Its filename is
     resource-constify-arg-to-resource_size-and-resource_type.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: resource: constify arg to resource_size() and resource_type()
From: Jean Delvare <khali@xxxxxxxxxxxx>

resource_size() doesn't change the resource it operates on, so the res
parameter can be marked const.  Same for resource_type().

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Reviewed-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/ioport.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN include/linux/ioport.h~resource-constify-arg-to-resource_size-and-resource_type include/linux/ioport.h
--- a/include/linux/ioport.h~resource-constify-arg-to-resource_size-and-resource_type
+++ a/include/linux/ioport.h
@@ -126,11 +126,11 @@ extern int allocate_resource(struct reso
 int adjust_resource(struct resource *res, resource_size_t start,
 		    resource_size_t size);
 resource_size_t resource_alignment(struct resource *res);
-static inline resource_size_t resource_size(struct resource *res)
+static inline resource_size_t resource_size(const struct resource *res)
 {
 	return res->end - res->start + 1;
 }
-static inline unsigned long resource_type(struct resource *res)
+static inline unsigned long resource_type(const struct resource *res)
 {
 	return res->flags & IORESOURCE_TYPE_BITS;
 }
_

Patches currently in -mm which might be from khali@xxxxxxxxxxxx are

origin.patch
linux-next.patch
ad525x_dpot-new-driver-for-ad525x-digital-potentiometers.patch
hwmon-driver-for-texas-instruments-amc6821-chip.patch
lis3lv02d-axis-remap-and-resource-setup-release.patch
lis3lv02d-i2c-support.patch
hwmon-w83627ehf-updates.patch
rtc-set-wakeup-capability-for-i2c-and-spi-rtc-drivers.patch
resource-constify-arg-to-resource_size-and-resource_type.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux