* [PATCH net-next] hyper-v: make uuid_le const
@ 2014-06-03 15:38 Stephen Hemminger
2014-06-03 17:30 ` KY Srinivasan
2014-06-04 1:19 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2014-06-03 15:38 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang; +Cc: devel, linux-kernel, netdev
The uuid structure could be managed as a const in several places.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
Patch against net-next because that is where most recent
hyper-v related changes are.
--- a/drivers/hv/channel_mgmt.c 2014-02-12 08:21:54.627887619 -0800
+++ b/drivers/hv/channel_mgmt.c 2014-06-03 08:08:47.030901345 -0700
@@ -365,7 +365,7 @@ static u32 next_vp;
* performance critical channels (IDE, SCSI and Network) will be uniformly
* distributed across all available CPUs.
*/
-static u32 get_vp_index(uuid_le *type_guid)
+static u32 get_vp_index(const uuid_le *type_guid)
{
u32 cur_cpu;
int i;
--- a/drivers/hv/vmbus_drv.c 2014-04-07 11:21:05.704486433 -0700
+++ b/drivers/hv/vmbus_drv.c 2014-06-03 08:11:14.771854064 -0700
@@ -435,7 +435,7 @@ static int vmbus_uevent(struct device *d
return ret;
}
-static uuid_le null_guid;
+static const uuid_le null_guid;
static inline bool is_null_guid(const __u8 *guid)
{
@@ -450,7 +450,7 @@ static inline bool is_null_guid(const __
*/
static const struct hv_vmbus_device_id *hv_vmbus_get_id(
const struct hv_vmbus_device_id *id,
- __u8 *guid)
+ const __u8 *guid)
{
for (; !is_null_guid(id->guid); id++)
if (!memcmp(&id->guid, guid, sizeof(uuid_le)))
@@ -779,9 +779,9 @@ EXPORT_SYMBOL_GPL(vmbus_driver_unregiste
* vmbus_device_create - Creates and registers a new child device
* on the vmbus.
*/
-struct hv_device *vmbus_device_create(uuid_le *type,
- uuid_le *instance,
- struct vmbus_channel *channel)
+struct hv_device *vmbus_device_create(const uuid_le *type,
+ const uuid_le *instance,
+ struct vmbus_channel *channel)
{
struct hv_device *child_device_obj;
--- a/drivers/hv/hyperv_vmbus.h 2014-04-07 11:21:05.704486433 -0700
+++ b/drivers/hv/hyperv_vmbus.h 2014-06-03 08:27:12.618223800 -0700
@@ -644,9 +644,9 @@ extern struct vmbus_connection vmbus_con
/* General vmbus interface */
-struct hv_device *vmbus_device_create(uuid_le *type,
- uuid_le *instance,
- struct vmbus_channel *channel);
+struct hv_device *vmbus_device_create(const uuid_le *type,
+ const uuid_le *instance,
+ struct vmbus_channel *channel);
int vmbus_device_register(struct hv_device *child_device_obj);
void vmbus_device_unregister(struct hv_device *device_obj);
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH net-next] hyper-v: make uuid_le const
2014-06-03 15:38 [PATCH net-next] hyper-v: make uuid_le const Stephen Hemminger
@ 2014-06-03 17:30 ` KY Srinivasan
2014-06-04 1:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: KY Srinivasan @ 2014-06-03 17:30 UTC (permalink / raw)
To: Stephen Hemminger, Haiyang Zhang; +Cc: devel, linux-kernel, netdev
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, June 3, 2014 8:38 AM
> To: KY Srinivasan; Haiyang Zhang
> Cc: devel@linuxdriverproject.org; linux-kernel@vger.kernel.org;
> netdev@vger.kernel.org
> Subject: [PATCH net-next] hyper-v: make uuid_le const
>
> The uuid structure could be managed as a const in several places.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Thanks Stephen.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
>
> ---
> Patch against net-next because that is where most recent hyper-v related
> changes are.
>
>
> --- a/drivers/hv/channel_mgmt.c 2014-02-12 08:21:54.627887619 -0800
> +++ b/drivers/hv/channel_mgmt.c 2014-06-03 08:08:47.030901345 -0700
> @@ -365,7 +365,7 @@ static u32 next_vp;
> * performance critical channels (IDE, SCSI and Network) will be uniformly
> * distributed across all available CPUs.
> */
> -static u32 get_vp_index(uuid_le *type_guid)
> +static u32 get_vp_index(const uuid_le *type_guid)
> {
> u32 cur_cpu;
> int i;
> --- a/drivers/hv/vmbus_drv.c 2014-04-07 11:21:05.704486433 -0700
> +++ b/drivers/hv/vmbus_drv.c 2014-06-03 08:11:14.771854064 -0700
> @@ -435,7 +435,7 @@ static int vmbus_uevent(struct device *d
> return ret;
> }
>
> -static uuid_le null_guid;
> +static const uuid_le null_guid;
>
> static inline bool is_null_guid(const __u8 *guid) { @@ -450,7 +450,7 @@
> static inline bool is_null_guid(const __
> */
> static const struct hv_vmbus_device_id *hv_vmbus_get_id(
> const struct hv_vmbus_device_id
> *id,
> - __u8 *guid)
> + const __u8 *guid)
> {
> for (; !is_null_guid(id->guid); id++)
> if (!memcmp(&id->guid, guid, sizeof(uuid_le))) @@ -779,9
> +779,9 @@ EXPORT_SYMBOL_GPL(vmbus_driver_unregiste
> * vmbus_device_create - Creates and registers a new child device
> * on the vmbus.
> */
> -struct hv_device *vmbus_device_create(uuid_le *type,
> - uuid_le *instance,
> - struct vmbus_channel *channel)
> +struct hv_device *vmbus_device_create(const uuid_le *type,
> + const uuid_le *instance,
> + struct vmbus_channel *channel)
> {
> struct hv_device *child_device_obj;
>
> --- a/drivers/hv/hyperv_vmbus.h 2014-04-07 11:21:05.704486433 -0700
> +++ b/drivers/hv/hyperv_vmbus.h 2014-06-03 08:27:12.618223800 -0700
> @@ -644,9 +644,9 @@ extern struct vmbus_connection vmbus_con
>
> /* General vmbus interface */
>
> -struct hv_device *vmbus_device_create(uuid_le *type,
> - uuid_le *instance,
> - struct vmbus_channel *channel);
> +struct hv_device *vmbus_device_create(const uuid_le *type,
> + const uuid_le *instance,
> + struct vmbus_channel *channel);
>
> int vmbus_device_register(struct hv_device *child_device_obj); void
> vmbus_device_unregister(struct hv_device *device_obj);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] hyper-v: make uuid_le const
2014-06-03 15:38 [PATCH net-next] hyper-v: make uuid_le const Stephen Hemminger
2014-06-03 17:30 ` KY Srinivasan
@ 2014-06-04 1:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-06-04 1:19 UTC (permalink / raw)
To: stephen; +Cc: devel, haiyangz, linux-kernel, netdev
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 3 Jun 2014 08:38:15 -0700
> The uuid structure could be managed as a const in several places.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-04 1:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03 15:38 [PATCH net-next] hyper-v: make uuid_le const Stephen Hemminger
2014-06-03 17:30 ` KY Srinivasan
2014-06-04 1:19 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).