[lkml]   [2016]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 25/26] pch_gbe: constify local structures
From: Julia Lawall <>
Date: Mon, 12 Sep 2016 11:07:15 +0200 (CEST)

> So foo is protected, but its lifetime of interest is quite short. But we
> can't set the ops field of the type of xxx to be const either, because it
> is obviously not - the code above modifies it.

You can definitely make it a pointer to a const thing.

Just like "netdev_ops" in struct net_device is const.

 \ /
  Last update: 2016-09-17 09:59    [W:0.059 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site