[Bug 216588] head -312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

            Bug ID: 216588
           Summary: head -312942 via amd64-xtoolchain-gcc:
                    dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error:
                    assignment of read-only variable 'entry'
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [hidden email]
          Reporter: [hidden email]
                CC: [hidden email]
                CC: [hidden email]

When I attempted to buildworld buildkernel for
-r312942 via use of amd64-xtoolchain-gcc it
stopped with:

--- all_subdir_mlx5en ---
/usr/src/sys/modules/mlx5en/../../dev/mlx5/mlx5_en/mlx5_en_ethtool.c: In
function 'mlx5e_create_diagnostics':
/usr/src/sys/modules/mlx5en/../../dev/mlx5/mlx5_en/mlx5_en_ethtool.c:665:9:
error: assignment of read-only variable 'entry'
   entry = mlx5_core_pci_diagnostics_table[x];
         ^
/usr/src/sys/modules/mlx5en/../../dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9:
error: assignment of read-only variable 'entry'
   entry = mlx5_core_general_diagnostics_table[x];
         ^
*** [mlx5_en_ethtool.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/mlx5en
.ERROR_TARGET='mlx5_en_ethtool.o'
.ERROR_META_FILE='/usr/obj/amd64_xtoolchain/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src/sys/modules/mlx5en/mlx5_en_ethtool.o.meta'

/usr/src/sys/dev/mlx5/diagnostics.h shows:

struct mlx5_core_diagnostics_entry {
        const char *const desc;
        u16     counter_id;
};

Note the const between * and desc: the pointer is
declared to be constant.

/usr/src/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
shows:

static void
mlx5e_create_diagnostics(struct mlx5e_priv *priv)
{
        struct mlx5_core_diagnostics_entry entry;
. . .
        for (x = 0; x != MLX5_CORE_PCI_DIAGNOSTICS_NUM; x++) {
                entry = mlx5_core_pci_diagnostics_table[x];
. . .
        }

        /* create general diagnostics */
        for (x = 0; x != MLX5_CORE_GENERAL_DIAGNOSTICS_NUM; x++) {
                entry = mlx5_core_general_diagnostics_table[x];
 . .
        }
}

which involves assignments to constant pointers: the
desc value is supposed to be constant.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

Mark Millard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
            Summary|head -312942 via            |head -r312942 via
                   |amd64-xtoolchain-gcc:       |amd64-xtoolchain-gcc:
                   |dev/mlx5/mlx5_en/mlx5_en_et |dev/mlx5/mlx5_en/mlx5_en_et
                   |htool.c:675:9: error:       |htool.c:675:9: error:
                   |assignment of read-only     |assignment of read-only
                   |variable 'entry'            |variable 'entry'

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

Ngie Cooper <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
           Assignee|[hidden email]    |[hidden email]

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

Ngie Cooper <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.freebsd.org/bu
                   |                            |gzilla/show_bug.cgi?id=2165
                   |                            |90

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

Hans Petter Selasky <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

--- Comment #1 from [hidden email] ---
A commit references this bug:

Author: hselasky
Date: Mon Jan 30 08:35:15 UTC 2017
New revision: 312983
URL: https://svnweb.freebsd.org/changeset/base/312983

Log:
  Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
  structure. This fixes compilation with amd64-xtoolchain-gcc.

  PR:                   216588
  MFC after:            1 week
  Sponsored by:         Mellanox Technologies

Changes:
  head/sys/dev/mlx5/diagnostics.h

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

Hans Petter Selasky <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Progress                 |Closed
         Resolution|---                         |FIXED

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

--- Comment #2 from [hidden email] ---
A commit references this bug:

Author: hselasky
Date: Thu Aug  3 14:19:27 UTC 2017
New revision: 322010
URL: https://svnweb.freebsd.org/changeset/base/322010

Log:
  MFC r312983:
  Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
  structure. This fixes compilation with amd64-xtoolchain-gcc.

  PR:                   216588
  Sponsored by:         Mellanox Technologies

Changes:
_U  stable/11/
  stable/11/sys/dev/mlx5/diagnostics.h

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 216588] head -r312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry'

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216588

--- Comment #3 from [hidden email] ---
A commit references this bug:

Author: hselasky
Date: Thu Aug  3 14:20:19 UTC 2017
New revision: 322011
URL: https://svnweb.freebsd.org/changeset/base/322011

Log:
  MFC r312983:
  Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
  structure. This fixes compilation with amd64-xtoolchain-gcc.

  PR:                   216588
  Sponsored by:         Mellanox Technologies

Changes:
_U  stable/10/
  stable/10/sys/dev/mlx5/diagnostics.h

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[hidden email]"
Loading...