Skip to contentSkip to conversation

ieee802154: fix new function declaration

PATCH Applied Jean Sacren 3 participants 3 messages Feb 26, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ieee802154: fix new function declaration

The commit 8fad346f366a7 ("eee802154: add basic support for RF212 to at86rf230 driver") introduced the new function is_rf212() with some minor issues in declaration:

1) Fix the function type by changing it to bool as the function definition returns a boolean value. Additionally both callers of is_rf212() are expected to return a boolean value.

2) Fix the function specifier by deleting the inline keyword as the compiler takes care of that.

Cc Phoebe Buckheister <[email protected]>
---
 drivers/net/ieee802154/at86rf230.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/at86rf230.c +1 -1
index 34bf011584fb..dd9ef5e1c730 100644
@@ -57,7 +57,7 @@ struct at86rf230_local {
 	int rssi_base_val;
 };
 
-static inline int is_rf212(struct at86rf230_local *local)
+static bool is_rf212(struct at86rf230_local *local)
 {
 	return local->part == 7;
 }
#1 lore raw
Quoted 8 lines · On Tue, 25 Feb 2014 22:38:29 -0700 Jean Sacren <[email protected]> wrote:

The commit 8fad346f366a7 ("eee802154: add basic support for RF212 to at86rf230 driver") introduced the new function is_rf212() with some minor issues in declaration:

1) Fix the function type by changing it to bool as the function definition returns a boolean value. Additionally both callers of is_rf212() are expected to return a boolean value.

Quoted 5 lines

2) Fix the function specifier by deleting the inline keyword as the compiler takes care of that.

Cc Phoebe Buckheister <[email protected]>

+1. My original intent was to have is_rf212 as a predicate like that, but I slipped.

maintainer Applied
#2 lore raw
In reply to Jean Sacren

From: Jean Sacren <[email protected]>
Date: Tue, 25 Feb 2014 22:38:29 -0700

Quoted 4 lines

The commit 8fad346f366a7 ("eee802154: add basic support for RF212 to at86rf230 driver") introduced the new function is_rf212() with some minor issues in declaration:

Quoted 8 lines

1) Fix the function type by changing it to bool as the function definition returns a boolean value. Additionally both callers of is_rf212() are expected to return a boolean value.

2) Fix the function specifier by deleting the inline keyword as the compiler takes care of that.

Applied, thanks.