From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395AbdBKJkD (ORCPT ); Sat, 11 Feb 2017 04:40:03 -0500 Received: from mga02.intel.com ([134.134.136.20]:40057 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbdBKJkB (ORCPT ); Sat, 11 Feb 2017 04:40:01 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,145,1484035200"; d="scan'208";a="819642476" Message-ID: <1486805999.2528.1.camel@linux.intel.com> Subject: Re: [PATCH] HID: intel-ish-hid: constify device_type structure From: Srinivas Pandruvada To: Bhumika Goyal , julia.lawall@lip6.fr, jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 11 Feb 2017 01:39:59 -0800 In-Reply-To: <1486797037-31415-1-git-send-email-bhumirks@gmail.com> References: <1486797037-31415-1-git-send-email-bhumirks@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.4 (3.22.4-2.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-02-11 at 12:40 +0530, Bhumika Goyal wrote: > Declare device_type structure as const as it is only stored in the > type field of a device structure. This field is of type const, so add > const to the declaration of device_type structure. > > File size before: drivers/hid/intel-ish-hid/ishtp/bus.o >    text    data     bss     dec     hex > filename >    4260     336      16    4612    1204 > hid/intel-ish-hid/ishtp/bus.o > > File size after: drivers/hid/intel-ish-hid/ishtp/bus.o >    text    data     bss     dec     hex > filename >    4324     272      16    4612    1204 > hid/intel-ish-hid/ishtp/bus.o > > Signed-off-by: Bhumika Goyal Acked-by: Srinivas Pandruvada > --- >  drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c > b/drivers/hid/intel-ish-hid/ishtp/bus.c > index f4cbc74..5f382fe 100644 > --- a/drivers/hid/intel-ish-hid/ishtp/bus.c > +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c > @@ -358,7 +358,7 @@ static void ishtp_cl_dev_release(struct device > *dev) >   kfree(to_ishtp_cl_device(dev)); >  } >   > -static struct device_type ishtp_cl_device_type = { > +static const struct device_type ishtp_cl_device_type = { >   .release = ishtp_cl_dev_release, >  }; >