linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Amitkumar Karwar <amitkarwar@gmail.com>
Cc: linux-wireless@vger.kernel.org,
	Amitkumar Karwar <amit.karwar@redpinesignals.com>,
	Prameela Rani Garnepudi <prameela.j04cs@gmail.com>,
	Karun Eagalapati <karun256@gmail.com>
Subject: Re: [PATCH 3/8] rsi: add support for legacy power save
Date: Wed, 02 Aug 2017 12:50:33 +0300	[thread overview]
Message-ID: <87efsu47ti.fsf@codeaurora.org> (raw)
In-Reply-To: <1501578352-10795-4-git-send-email-amitkarwar@gmail.com> (Amitkumar Karwar's message of "Tue, 1 Aug 2017 14:35:47 +0530")

Amitkumar Karwar <amitkarwar@gmail.com> writes:

> From: Karun Eagalapati <karun256@gmail.com>
>
> This patch adds support for legacy power save. Necessary
> configuration frames are downloaded to firmware when power save
> is enabled/disabled
>
> Signed-off-by: Karun Eagalapati <karun256@gmail.com>
> Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>

[...]

> +/* This function sends power save request to firmware */
> +int rsi_send_ps_request(struct rsi_hw *adapter, bool enable)

The comment is quite useless, IMHO the function name already tells the
same as the comment.

> --- /dev/null
> +++ b/drivers/net/wireless/rsi/rsi_91x_ps.c
> @@ -0,0 +1,149 @@
> +/*
> + * Copyright (c) 2017 Redpine Signals Inc. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions are met:
> + *
> + *	1. Redistributions of source code must retain the above copyright
> + *	   notice, this list of conditions and the following disclaimer.
> + *
> + *	2. Redistributions in binary form must reproduce the above copyright
> + *	   notice, this list of conditions and the following disclaimer in the
> + *	   documentation and/or other materials provided with the distribution.
> + *
> + *	3. Neither the name of the copyright holder nor the names of its
> + *	   contributors may be used to endorse or promote products derived from
> + *	   this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION). HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + */

The license is now different than in rest of the driver files which is a
bit weird. I would prefer to have the same license throughout the
driver.

> +/* This function returns the ps state in string format */
> +char *str_psstate(enum ps_state state)

[...]

> +/* This function modifies PS state to a new state */
> +static inline void rsi_modify_ps_state(struct rsi_hw *adapter,

[...]

> +/* This function Initalises ps_info structure with default parameters */
> +void rsi_default_ps_params(struct rsi_hw *adapter)

[...]

> +/* This function is used to enable power save */
> +void rsi_enable_ps(struct rsi_hw *adapter)

[...]

> +/* This function is used to disable power save */
> +void rsi_disable_ps(struct rsi_hw *adapter)

[...]

> +/* This function Processes powersave confirmation */
> +int rsi_handle_ps_confirm(struct rsi_hw *adapter, u8 *msg)

More useless comments. The code comments should provide more
information, not replicate what is already in the code.

-- 
Kalle Valo

  reply	other threads:[~2017-08-02  9:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01  9:05 [PATCH 0/8] rsi driver enhancements Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 1/8] rsi: add support for rf-kill functionality Amitkumar Karwar
2017-08-02  9:38   ` Kalle Valo
2017-08-03 14:34     ` Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 2/8] rsi: update set_antenna command frame Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 3/8] rsi: add support for legacy power save Amitkumar Karwar
2017-08-02  9:50   ` Kalle Valo [this message]
2017-08-03 14:36     ` Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 4/8] rsi: add support for U-APSD " Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 5/8] rsi: rename sdio_read_buffer_status_register Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 6/8] rsi: buffer full check optimization Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 7/8] rsi: buffer available interrupt handling Amitkumar Karwar
2017-08-01  9:05 ` [PATCH 8/8] rsi: RTS threshold configuration Amitkumar Karwar

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=87efsu47ti.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=amit.karwar@redpinesignals.com \
    --cc=amitkarwar@gmail.com \
    --cc=karun256@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=prameela.j04cs@gmail.com \
    /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).