From patchwork Fri Aug 29 15:21:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 4811461 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C67BEC0338 for ; Fri, 29 Aug 2014 15:41:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BBEC200F4 for ; Fri, 29 Aug 2014 15:41:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E54B62010B for ; Fri, 29 Aug 2014 15:41:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CA666E70F; Fri, 29 Aug 2014 08:41:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 180836E2A2 for ; Fri, 29 Aug 2014 08:21:33 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 29 Aug 2014 08:21:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,424,1406617200"; d="scan'208";a="591743207" Received: from salacea-mobl1.amr.corp.intel.com (HELO jtkirshe-mobl.amr.corp.intel.com) ([10.255.68.251]) by fmsmga002.fm.intel.com with ESMTP; 29 Aug 2014 08:21:32 -0700 From: Jeff Kirsher To: airlied@linux.ie Subject: [PATCH 2/2] drm: Resolve shadow warning for s32 Date: Fri, 29 Aug 2014 08:21:26 -0700 Message-Id: <1409325686-13994-2-git-send-email-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1409325686-13994-1-git-send-email-jeffrey.t.kirsher@intel.com> References: <1409325686-13994-1-git-send-email-jeffrey.t.kirsher@intel.com> X-Mailman-Approved-At: Fri, 29 Aug 2014 08:41:21 -0700 Cc: Mark Rustad , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jeff Kirsher X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Rustad Resolve a shadow warning produced in a W=2 build by changing the name of a local variable from s32 to ds32. Since s32 clashes with the well-known typedef, any macro expansion that could someday be used that might attempt to use an s32 type would fail to compile. It is best to eliminate the hazard. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher --- drivers/gpu/drm/drm_ioc32.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c index 2f4c4343..777ffd8 100644 --- a/drivers/gpu/drm/drm_ioc32.c +++ b/drivers/gpu/drm/drm_ioc32.c @@ -339,7 +339,7 @@ typedef struct drm_stats32 { static int compat_drm_getstats(struct file *file, unsigned int cmd, unsigned long arg) { - drm_stats32_t s32; + drm_stats32_t ds32; drm_stats32_t __user *argp = (void __user *)arg; struct drm_stats __user *stats; int i, err; @@ -352,14 +352,14 @@ static int compat_drm_getstats(struct file *file, unsigned int cmd, if (err) return err; - if (__get_user(s32.count, &stats->count)) + if (__get_user(ds32.count, &stats->count)) return -EFAULT; for (i = 0; i < 15; ++i) - if (__get_user(s32.data[i].value, &stats->data[i].value) - || __get_user(s32.data[i].type, &stats->data[i].type)) + if (__get_user(ds32.data[i].value, &stats->data[i].value) + || __get_user(ds32.data[i].type, &stats->data[i].type)) return -EFAULT; - if (copy_to_user(argp, &s32, sizeof(s32))) + if (copy_to_user(argp, &ds32, sizeof(ds32))) return -EFAULT; return 0; }