Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
On 10/09/2015 04:25 PM, Yaowei Bai wrote: >> Yaowei, feel free to send the CAN patch as part of your series directly >> to David. > > OK, i'll do that and sorry for disturbing you. :) Putting me on Cc was 100% correct, but IMHO no need to split up the series when David can apply it in one go. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
On 10/09/2015 04:25 PM, Yaowei Bai wrote: >> Yaowei, feel free to send the CAN patch as part of your series directly >> to David. > > OK, i'll do that and sorry for disturbing you. :) Putting me on Cc was 100% correct, but IMHO no need to split up the series when David can apply it in one go. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
On Fri, Oct 09, 2015 at 12:14:31PM +0200, Marc Kleine-Budde wrote: > On 10/08/2015 03:28 PM, Yaowei Bai wrote: > > This patch makes can_dropped_invalid_skb return bool due to this > > particular function only using either one or zero as its return > > value. > > > > No functional change. > > > > Signed-off-by: Yaowei Bai > > Acked-by: Marc Kleine-Budde Thanks. > > Yaowei, feel free to send the CAN patch as part of your series directly > to David. OK, i'll do that and sorry for disturbing you. :) Thanks Bai > > Marc > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Industrial Linux Solutions| Phone: +49-231-2826-924 | > Vertretung West/Dortmund | Fax: +49-5121-206917- | > Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
On 10/08/2015 03:28 PM, Yaowei Bai wrote: > This patch makes can_dropped_invalid_skb return bool due to this > particular function only using either one or zero as its return > value. > > No functional change. > > Signed-off-by: Yaowei Bai Acked-by: Marc Kleine-Budde Yaowei, feel free to send the CAN patch as part of your series directly to David. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
On 10/08/2015 03:28 PM, Yaowei Bai wrote: > This patch makes can_dropped_invalid_skb return bool due to this > particular function only using either one or zero as its return > value. > > No functional change. > > Signed-off-by: Yaowei BaiAcked-by: Marc Kleine-Budde Yaowei, feel free to send the CAN patch as part of your series directly to David. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
On Fri, Oct 09, 2015 at 12:14:31PM +0200, Marc Kleine-Budde wrote: > On 10/08/2015 03:28 PM, Yaowei Bai wrote: > > This patch makes can_dropped_invalid_skb return bool due to this > > particular function only using either one or zero as its return > > value. > > > > No functional change. > > > > Signed-off-by: Yaowei Bai> > Acked-by: Marc Kleine-Budde Thanks. > > Yaowei, feel free to send the CAN patch as part of your series directly > to David. OK, i'll do that and sorry for disturbing you. :) Thanks Bai > > Marc > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Industrial Linux Solutions| Phone: +49-231-2826-924 | > Vertretung West/Dortmund | Fax: +49-5121-206917- | > Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
This patch makes can_dropped_invalid_skb return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/can/dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index c3a9c8f..c92d6ea 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -77,7 +77,7 @@ struct can_priv { #define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC)) /* Drop a given socketbuffer if it does not contain a valid CAN frame. */ -static inline int can_dropped_invalid_skb(struct net_device *dev, +static inline bool can_dropped_invalid_skb(struct net_device *dev, struct sk_buff *skb) { const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; @@ -93,12 +93,12 @@ static inline int can_dropped_invalid_skb(struct net_device *dev, } else goto inval_skb; - return 0; + return false; inval_skb: kfree_skb(skb); dev->stats.tx_dropped++; - return 1; + return true; } static inline bool can_is_canfd_skb(const struct sk_buff *skb) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean
This patch makes can_dropped_invalid_skb return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai--- include/linux/can/dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index c3a9c8f..c92d6ea 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -77,7 +77,7 @@ struct can_priv { #define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC)) /* Drop a given socketbuffer if it does not contain a valid CAN frame. */ -static inline int can_dropped_invalid_skb(struct net_device *dev, +static inline bool can_dropped_invalid_skb(struct net_device *dev, struct sk_buff *skb) { const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; @@ -93,12 +93,12 @@ static inline int can_dropped_invalid_skb(struct net_device *dev, } else goto inval_skb; - return 0; + return false; inval_skb: kfree_skb(skb); dev->stats.tx_dropped++; - return 1; + return true; } static inline bool can_is_canfd_skb(const struct sk_buff *skb) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/