public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] mux: correct prototype for mux_control_try_select()
@ 2021-07-13 21:02 Patrick Wildt
  2021-07-14  8:12 ` Pratyush Yadav
  2021-07-23 12:34 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Wildt @ 2021-07-13 21:02 UTC (permalink / raw)
  To: Simon Glass; +Cc: Pratyush Yadav, Jean-Jacques Hiblot, u-boot

The macro should be passed a state, which should be passed
to the actual function.  Otherwise using that macro would
yield a build error.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
---
 include/mux.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/mux.h b/include/mux.h
index 23844f480a..9f80991274 100644
--- a/include/mux.h
+++ b/include/mux.h
@@ -51,7 +51,7 @@ unsigned int mux_control_states(struct mux_control *mux);
  */
 int __must_check mux_control_select(struct mux_control *mux,
 				    unsigned int state);
-#define mux_control_try_select(mux) mux_control_select(mux)
+#define mux_control_try_select(mux, state) mux_control_select(mux, state)
 
 /**
  * mux_control_deselect() - Deselect the previously selected multiplexer state.
@@ -128,7 +128,7 @@ int __must_check mux_control_select(struct mux_control *mux,
 	return -ENOSYS;
 }
 
-#define mux_control_try_select(mux) mux_control_select(mux)
+#define mux_control_try_select(mux, state) mux_control_select(mux, state)
 
 int mux_control_deselect(struct mux_control *mux)
 {
-- 
2.32.0


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

* Re: [PATCH] mux: correct prototype for mux_control_try_select()
  2021-07-13 21:02 [PATCH] mux: correct prototype for mux_control_try_select() Patrick Wildt
@ 2021-07-14  8:12 ` Pratyush Yadav
  2021-07-23 12:34 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Pratyush Yadav @ 2021-07-14  8:12 UTC (permalink / raw)
  To: Patrick Wildt; +Cc: Simon Glass, u-boot

-JJ since the email would bounce.

On 13/07/21 11:02PM, Patrick Wildt wrote:
> The macro should be passed a state, which should be passed
> to the actual function.  Otherwise using that macro would
> yield a build error.

Nitpick: Lines are too short. The usual convention is 72 chars and you 
seem to be terminating them at 60.

Other than this,

Reviewed-by: Pratyush Yadav <p.yadav@ti.com>

> 
> Signed-off-by: Patrick Wildt <patrick@blueri.se>
> ---
>  include/mux.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/mux.h b/include/mux.h
> index 23844f480a..9f80991274 100644
> --- a/include/mux.h
> +++ b/include/mux.h
> @@ -51,7 +51,7 @@ unsigned int mux_control_states(struct mux_control *mux);
>   */
>  int __must_check mux_control_select(struct mux_control *mux,
>  				    unsigned int state);
> -#define mux_control_try_select(mux) mux_control_select(mux)
> +#define mux_control_try_select(mux, state) mux_control_select(mux, state)
>  
>  /**
>   * mux_control_deselect() - Deselect the previously selected multiplexer state.
> @@ -128,7 +128,7 @@ int __must_check mux_control_select(struct mux_control *mux,
>  	return -ENOSYS;
>  }
>  
> -#define mux_control_try_select(mux) mux_control_select(mux)
> +#define mux_control_try_select(mux, state) mux_control_select(mux, state)
>  
>  int mux_control_deselect(struct mux_control *mux)
>  {
> -- 
> 2.32.0
> 

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.

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

* Re: [PATCH] mux: correct prototype for mux_control_try_select()
  2021-07-13 21:02 [PATCH] mux: correct prototype for mux_control_try_select() Patrick Wildt
  2021-07-14  8:12 ` Pratyush Yadav
@ 2021-07-23 12:34 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-07-23 12:34 UTC (permalink / raw)
  To: Patrick Wildt; +Cc: Simon Glass, Pratyush Yadav, Jean-Jacques Hiblot, u-boot

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

On Tue, Jul 13, 2021 at 11:02:18PM +0200, Patrick Wildt wrote:

> The macro should be passed a state, which should be passed
> to the actual function.  Otherwise using that macro would
> yield a build error.
> 
> Signed-off-by: Patrick Wildt <patrick@blueri.se>
> Reviewed-by: Pratyush Yadav <p.yadav@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2021-07-23 12:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-13 21:02 [PATCH] mux: correct prototype for mux_control_try_select() Patrick Wildt
2021-07-14  8:12 ` Pratyush Yadav
2021-07-23 12:34 ` Tom Rini

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