Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp16462ybi; Thu, 13 Jun 2019 10:48:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqySB2G+XMlKGOwcQqYM7wFltaFtfIX548kLIXEYepCm6m5ir0HVVL2lXDFW+9dXT6sHOC6B X-Received: by 2002:a65:568d:: with SMTP id v13mr8895204pgs.144.1560448107822; Thu, 13 Jun 2019 10:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560448107; cv=none; d=google.com; s=arc-20160816; b=n4Jq0wAiBho8dIi0VLG4TnIMwVcnG/xKEk0fBHESn267jcrtf3FVCf+zPeX2CFnztT ANoBTygJA85QMepo88Q0i1fCZYyoXPu+Z6fUjZjS1VzhNUOIFm5mC7uPIN/z6pXlp+uQ KB+VstWFt6geE3H/03M+3nEBxXqzYqVVRmtMK7JjXxZzXGUqZCixyfHCjeOhKq97b96Z FLH5P+ukphf3Z6+/HIMNdQhmig3jL6HZLZmmQvMql/nYLrEHOGxfnULa+eqZtxkcy6qs xryDAKxf9TTXqf4GT/GbeFHXblZbxSuk+o9/yMfeIGpmcrOVHjx2Y3jlVe5Eu+Q/20n/ 2F6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OtqNd27XHnCRsfcGvnXPu8MWk1j9TxUbVAvasUsnvR0=; b=muYCR+2R7k9B5nptTcApGD/LW0eeh8QgVv8/xC14AS5UdHK/wr0kc6K4zI1V2NtPqk TqZ7AyZ51jV/TVC7AozdobGS056uqo5wAWCuL2HBtm3wYVd30Fg1tfU8TpXaZA7Zo5nt Hjy6aoHUfuuOTD+FCfuFuJ5Pp54SvP2sHEPLTZDTsyMuB7NJfnFiyrRXfaTEVIse/ZKn xEUqodHdAip0U/JcjccfsUeqMzyK78sAdZewSab3gpwe7/r5DVqoYvCM3YNgKdTDBwD6 48wnqICQiCpD8fRHwgOfpUxcXHKYRX8Xe3tQcBp3apRa+3eLL2Kf8RGV4usWYTEHUDgR ON6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Mp95nN46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si198027plj.124.2019.06.13.10.48.13; Thu, 13 Jun 2019 10:48:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Mp95nN46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727070AbfFMRsF (ORCPT + 99 others); Thu, 13 Jun 2019 13:48:05 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44863 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbfFMRsF (ORCPT ); Thu, 13 Jun 2019 13:48:05 -0400 Received: by mail-pg1-f194.google.com with SMTP id n2so11352877pgp.11 for ; Thu, 13 Jun 2019 10:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OtqNd27XHnCRsfcGvnXPu8MWk1j9TxUbVAvasUsnvR0=; b=Mp95nN46p0avucch7HE16s7c+ipTeovth827wa44CgRJ/MFRnMj3Aju5KdNSzwh1oY FeU5LWHahwLMLEGghmQKKOLWHL1Fl9ruy2m75J1/rsePQFmgGxr9krNrO/6gdIAofuUD 79iV9S9mgF0Xq4lmte8BjCbpuJ883HHVa2DSoZbyT5R98IEmOmRJKjEyiGQLC4wDk/Zu a0xUv3ATfpjnhzEbzMSvj0jJhXQYlen+EBPKSPrWKKWVuCePGcdshhaxIEImKyWLXtmw EBo4goSLamStZZn4Ajchx0LpXsSUodv+UjCaeREuv+UWVwzvJjhxt6JhaMDFGhv9jGZq 6BIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OtqNd27XHnCRsfcGvnXPu8MWk1j9TxUbVAvasUsnvR0=; b=a+6XXj7cuXkJ1WeNgYQ84PYQ8su5cAN6oYYfhGR4DQaiJqnrbsZ2mu3S+AUj8Cc1pa R3OJZ/QPQFrWTBNo7BoT3SxAENa5Cy4M2gK0YbSilxnb8DqmenPS25J2vDTVzTxjORVY kknozcZtrJgfmx3uPpRsIBiZwRtmDh9eqL/qrbfFQ15XFopCmrMCr1u3MVoLiqUQ6vnE NXxHAULlXE4NfjefC+e2eSkK8o9HBKYSlg8wHagIosEMD6mVn3h4Rkn6OJQQCJaL0HtZ t9OUE64+YkhSaPVy0mqiIsDCvXakRBsvT02Hwc9XvBBkrntRD+xHsyXtfLLcKviqg1+Y o9ZA== X-Gm-Message-State: APjAAAUuHCvVRn7UUOjvAoaeobP8J5sDLiHyQv0dY3epYv0VxJGkfW2z 19QGEuWGhqO2hASSIpBng5XXJJWpuG5vRGLmbZRX1g== X-Received: by 2002:a63:1d5c:: with SMTP id d28mr31364633pgm.10.1560448084290; Thu, 13 Jun 2019 10:48:04 -0700 (PDT) MIME-Version: 1.0 References: <20190612235803.9290-1-nhuck@google.com> In-Reply-To: <20190612235803.9290-1-nhuck@google.com> From: Nick Desaulniers Date: Thu, 13 Jun 2019 10:47:53 -0700 Message-ID: Subject: Re: [PATCH] Input: atmel_mxt_ts - fix -Wunused-const-variable To: Nathan Huckleberry Cc: nick@shmanahar.org, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 12, 2019 at 4:58 PM 'Nathan Huckleberry' via Clang Built Linux wrote: > Since mxt_video_fops is only used inside an ifdef. It should > be moved inside the ifdef. Thanks for the patch! I agree. I think it would be better and clearer to sink the definition of `mxt_video_fops` down closer to its use, immediately before the definition of `mxt_video_device`. Then it would be closer to its use and it would also be within the existing ifdef. > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c > @@ -256,6 +256,7 @@ enum v4l_dbg_inputs { > MXT_V4L_INPUT_MAX, > }; > > +#ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 > static const struct v4l2_file_operations mxt_video_fops = { > .owner = THIS_MODULE, > .open = v4l2_fh_open, > @@ -265,6 +266,7 @@ static const struct v4l2_file_operations mxt_video_fops = { > .mmap = vb2_fop_mmap, > .poll = vb2_fop_poll, > }; > +#endif -- Thanks, ~Nick Desaulniers