mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fpga-manager: Replaced macro with static inline function
@ 2016-03-01 17:39 Moritz Fischer
  2016-03-01 18:24 ` Greg KH
  2016-03-01 18:47 ` atull
  0 siblings, 2 replies; 3+ messages in thread
From: Moritz Fischer @ 2016-03-01 17:39 UTC (permalink / raw)
  To: atull; +Cc: gregkh, linux-kernel, Moritz Fischer

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 include/linux/fpga/fpga-mgr.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index 0940bf4..8064f1b 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -107,7 +107,10 @@ struct fpga_manager {
 	void *priv;
 };
 
-#define to_fpga_manager(d) container_of(d, struct fpga_manager, dev)
+static inline struct fpga_manager *to_fpga_manager(struct device *d)
+{
+	return container_of(d, struct fpga_manager, dev);
+}
 
 int fpga_mgr_buf_load(struct fpga_manager *mgr, u32 flags,
 		      const char *buf, size_t count);
-- 
2.4.3

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

* Re: [PATCH] fpga-manager: Replaced macro with static inline function
  2016-03-01 17:39 [PATCH] fpga-manager: Replaced macro with static inline function Moritz Fischer
@ 2016-03-01 18:24 ` Greg KH
  2016-03-01 18:47 ` atull
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-03-01 18:24 UTC (permalink / raw)
  To: Moritz Fischer; +Cc: atull, linux-kernel

On Tue, Mar 01, 2016 at 09:39:33AM -0800, Moritz Fischer wrote:
> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
> ---
>  include/linux/fpga/fpga-mgr.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)


We can't take patches without a changelog comment explaining why this
change is needed :(

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

* Re: [PATCH] fpga-manager: Replaced macro with static inline function
  2016-03-01 17:39 [PATCH] fpga-manager: Replaced macro with static inline function Moritz Fischer
  2016-03-01 18:24 ` Greg KH
@ 2016-03-01 18:47 ` atull
  1 sibling, 0 replies; 3+ messages in thread
From: atull @ 2016-03-01 18:47 UTC (permalink / raw)
  To: Moritz Fischer; +Cc: gregkh, linux-kernel

On Tue, 1 Mar 2016, Moritz Fischer wrote:

> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
> ---
>  include/linux/fpga/fpga-mgr.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
> index 0940bf4..8064f1b 100644
> --- a/include/linux/fpga/fpga-mgr.h
> +++ b/include/linux/fpga/fpga-mgr.h
> @@ -107,7 +107,10 @@ struct fpga_manager {
>  	void *priv;
>  };
>  
> -#define to_fpga_manager(d) container_of(d, struct fpga_manager, dev)
> +static inline struct fpga_manager *to_fpga_manager(struct device *d)
> +{
> +	return container_of(d, struct fpga_manager, dev);
> +}

Hi Moritz,

I really appreciate your work on this stuff.  But I don't think we need to
do this.

Alan


>  
>  int fpga_mgr_buf_load(struct fpga_manager *mgr, u32 flags,
>  		      const char *buf, size_t count);
> -- 
> 2.4.3
> 
> 

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

end of thread, other threads:[~2016-03-01 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-01 17:39 [PATCH] fpga-manager: Replaced macro with static inline function Moritz Fischer
2016-03-01 18:24 ` Greg KH
2016-03-01 18:47 ` atull

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®