devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varka Bhadram <varkabhadram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Varka Bhadram <varkab-If5XQcfNmg0@public.gmane.org>,
	"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
	<linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	"davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org"
	<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: Re: [PATCH net-next v2 1/3] ieee802154: cc2520: adds driver for TI CC2520 radio
Date: Wed, 18 Jun 2014 14:56:16 +0530	[thread overview]
Message-ID: <53A15B38.6060404@gmail.com> (raw)
In-Reply-To: <20140618091010.GB26461@leverpostej>


[-- Attachment #1.1: Type: text/plain, Size: 1785 bytes --]

On 06/18/2014 02:40 PM, Mark Rutland wrote:
> On Wed, Jun 18, 2014 at 06:16:03AM +0100, Varka Bhadram wrote:
>> Driver support:
>>          - Tx and Rx of IEEE-802.15.4 packets.
>>          - Energy Detection on channel.
>>          - Setting the Channel for the radio. [b/w 11 - 26 channels]
>>          - Start and Stop the radio.
>>
>> Signed-off-by: Varka Bhadram <varkab-If5XQcfNmg0@public.gmane.org>
>> ---
>>   drivers/net/ieee802154/cc2520.c |  968 +++++++++++++++++++++++++++++++++++++++
>>   include/linux/spi/cc2520.h      |   26 ++
>>   2 files changed, 994 insertions(+)
>>   create mode 100644 drivers/net/ieee802154/cc2520.c
>>   create mode 100644 include/linux/spi/cc2520.h
> [...]
>
>> +static struct cc2520_platform_data *
>> +cc2520_get_platform_data(struct spi_device *spi)
>> +{
>> +       struct cc2520_platform_data *pdata;
>> +       struct device_node __maybe_unused *np = spi->dev.of_node;
>> +       struct cc2520_private *priv = spi_get_drvdata(spi);
>> +
>> +       if (!IS_ENABLED(CONFIG_OF) || !np)
>> +               return spi->dev.platform_data;
> Surely "if (!np)" is good enough?

This condition i chooses because either of thing is defined.
If the CONFIG_OF is enabled or devicetree node defined in the devicetree source.

I think checking np is enough.

> [...]
>
>> +static int cc2520_probe(struct spi_device *spi)
>> +{
>> +       struct cc2520_private *priv;
>> +       struct pinctrl *pinctrl;
>> +       struct cc2520_platform_data *pdata;
>> +       struct device_node __maybe_unused *np = spi->dev.of_node;
> This looks to be definitely unused rather than __maybe_unused. There are
> no other occuences of "np" in this function.

|This macro defined like this.
#define  __maybe_unused  __attribute__((unused))

|

> Mark.

Varka Bhadram



[-- Attachment #1.2: Type: text/html, Size: 2939 bytes --]

[-- Attachment #2: Type: text/plain, Size: 370 bytes --]

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems

[-- Attachment #3: Type: text/plain, Size: 213 bytes --]

_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

  reply	other threads:[~2014-06-18  9:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18  5:16 [PATCH net-next v2 0/3] Driver fir TI CC2520 Radio Varka Bhadram
2014-06-18  5:16 ` [PATCH net-next v2 1/3] ieee802154: cc2520: adds driver for TI CC2520 radio Varka Bhadram
2014-06-18  9:10   ` Mark Rutland
2014-06-18  9:26     ` Varka Bhadram [this message]
     [not found]       ` <53A15B38.6060404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-18  9:55         ` Mark Rutland
2014-06-18 11:13           ` Varka Bhadram
2014-06-18 13:39             ` Mark Rutland
     [not found] ` <1403068565-32224-1-git-send-email-varkab-If5XQcfNmg0@public.gmane.org>
2014-06-18  5:16   ` [PATCH net-next v2 2/3] ieee802154: cc2520: add driver to kernel build system Varka Bhadram
2014-06-18  5:16   ` [PATCH net-next v2 3/3] devicetree: add devicetree bindings for cc2520 driver Varka Bhadram
2014-06-18  9:05     ` Mark Rutland
2014-06-18  9:11       ` Varka Bhadram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A15B38.6060404@gmail.com \
    --to=varkabhadram-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=varkab-If5XQcfNmg0@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).