All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Adrian Pop <popadrian1996@gmail.com>
Cc: netdev@vger.kernel.org, linville@tuxdriver.com,
	davem@davemloft.net, kuba@kernel.org, jiri@mellanox.com,
	vadimp@mellanox.com, mlxsw@mellanox.com, idosch@mellanox.com,
	andrew@lunn.ch
Subject: Re: [PATCH] ethtool: Add QSFP-DD support
Date: Tue, 4 Aug 2020 12:30:20 +0200	[thread overview]
Message-ID: <20200804103020.4myko3zlw3bh62az@lion.mk-sys.cz> (raw)
In-Reply-To: <20200731084725.7804-1-popadrian1996@gmail.com>

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

I noticed one more minor problem:

On Fri, Jul 31, 2020 at 11:47:25AM +0300, Adrian Pop wrote:
> +static void qsfp_dd_show_sig_optical_pwr(const __u8 *id, __u32 eeprom_len)
> +{
> +	static const char * const aw_strings[] = {
> +		"%s power high alarm   (Channel %d)",
> +		"%s power low alarm    (Channel %d)",
> +		"%s power high warning (Channel %d)",
> +		"%s power low warning  (Channel %d)"
> +	};
> +	__u8 module_type = id[QSFP_DD_MODULE_TYPE_OFFSET];
> +	char field_desc[QSFP_DD_MAX_DESC_SIZE];
> +	struct qsfp_dd_diags sd = { { 0 } };

This causes a compiler warning with recent gcc:

  qsfp-dd.c: In function ‘qsfp_dd_show_sig_optical_pwr’:
  qsfp-dd.c:438:9: warning: missing initializer for field ‘sfp_temp’ of ‘struct qsfp_dd_diags’ [-Wmissing-field-initializers]
    438 |  struct qsfp_dd_diags sd = { { 0 } };
        |         ^~~~~~~~~~~~~
  In file included from qsfp-dd.c:26:
  qsfp-dd.h:30:8: note: ‘sfp_temp’ declared here
     30 |  __s16 sfp_temp[4];
        |        ^~~~~~~~

An empty initializer like

	struct qsfp_dd_diags sd = {};

should be fine (and is already used in many other places).

Michal

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

  parent reply	other threads:[~2020-08-04 10:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  8:47 [PATCH] ethtool: Add QSFP-DD support Adrian Pop
2020-08-02 16:55 ` Andrew Lunn
2020-08-04  7:44 ` Ido Schimmel
2020-08-04  8:23   ` Adrian Pop
2020-08-04 10:14 ` Michal Kubecek
2020-08-04 10:25   ` Adrian Pop
2020-08-04 17:18     ` Michal Kubecek
2020-08-06 15:13       ` Adrian Pop
2020-08-04 10:30 ` Michal Kubecek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-09 12:42 Adrian Pop
2019-11-09 15:33 ` Andrew Lunn
     [not found]   ` <CAL_jBfQhVAy24xbz_VbpPM0QtRu-Uzawhyn=AY0b41B9=v3Ytg@mail.gmail.com>
2019-11-13 13:59     ` Andrew Lunn
2019-11-15 19:00       ` Adrian Pop
     [not found] ` <20191115201508.GF24205@lunn.ch>
2019-11-15 21:34   ` Adrian Pop

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=20200804103020.4myko3zlw3bh62az@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=popadrian1996@gmail.com \
    --cc=vadimp@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.