Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751485AbdHaJua (ORCPT ); Thu, 31 Aug 2017 05:50:30 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37769 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbdHaJu2 (ORCPT ); Thu, 31 Aug 2017 05:50:28 -0400 X-Google-Smtp-Source: ADKCNb5lk/3xQNG/myGHtNBlr4ZHnXHrC9p3njPcx8zqdKf6/1lHyMBUSsmHMCFCqZ6YabAAQ2uBUA== Subject: Re: [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs To: hubcap@omnibond.com References: <1ec6b9eca12e894181fd05876481c7eef7eff691.1503463899.git.arvind.yadav.cs@gmail.com> Cc: linux-kernel@vger.kernel.org From: Arvind Yadav Message-ID: <0e1e8c9e-932c-72eb-347f-ff95fc79164b@gmail.com> Date: Thu, 31 Aug 2017 15:20:05 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1ec6b9eca12e894181fd05876481c7eef7eff691.1503463899.git.arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 27 Sorry for noise, Please Ignore this. :( On Thursday 31 August 2017 03:16 PM, Arvind Yadav wrote: > drm_fb_helper_funcs are not supposed to change at runtime. > All functions working with drm_fb_helper_funcs provided by > work with const drm_fb_helper_funcs. > So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/staging/vboxvideo/vbox_fb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c > index 35f6d9f..70d99b7 100644 > --- a/drivers/staging/vboxvideo/vbox_fb.c > +++ b/drivers/staging/vboxvideo/vbox_fb.c > @@ -330,7 +330,7 @@ static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, > *blue = regno; > } > > -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > .gamma_set = vbox_fb_gamma_set, > .gamma_get = vbox_fb_gamma_get, > .fb_probe = vboxfb_create,