Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1992742imm; Thu, 20 Sep 2018 06:14:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbPU2o5iGRoIEG6MOtDmrDfYCAlYHBRkI3u1yJUyMnETds+mauwB8rFuLvjY3s0CLYw8KFx X-Received: by 2002:a63:221b:: with SMTP id i27-v6mr35977390pgi.212.1537449258362; Thu, 20 Sep 2018 06:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537449258; cv=none; d=google.com; s=arc-20160816; b=hOrE6BzkPGx6WNNjkrkwUK6lNoZrehR91wLcglTbWzBS87zRJHgU9I9pm6P5cyvAsk bwafb1pNnBYBoTxekthyRXZP1R7epqCGrUEI9eJLjuytsJt3Sc98tShF134WtEzLIIVQ s8RRGKnxfz0LSgUA647ttS3m64fPHy1hpuJr/PaGkRjnlhbQ8kqM5ra5gVZbop7A87Rm 0WQhyWsvHam6vE0f7S3E+r36LoqLm+MrpeYdvvlH2GuoxNe403/Xoh8JnRD3XV8kSwzD DUOkIrhTn29SqGDG9oZww0QcBVoVTbqUYcyXzUcmOF5z/JBJNLjOYsSfo+nXsSGZdd9r FG4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=fAv3fkGtEFFgpQldlMlLwzoY1Rd4WJDdPtGiuYr6xsc=; b=LuHW29tnVFF7SVseIjAkOCLDaQAhKajfQ29a4i6cMm/9Ca6fpaweAfHUAC2rL15pZQ 5PddaPQx0kzYfBHucfg3B8QpqeDOtekV0qJqAMmJXTXAb0W7Svv7oUUlOxpLESYUyNQu ymO58P0OLYLGcsjUmLf/hEJ9fkZ6IKPAFQwB3Ab/IouevSnIR5BHUaajnEcZgBIluCxw kLS5osQllfrnMGC49F1eZiUc7gLXx17d9hVeg+sAFOlYa1V8CAPYzM3hSxVLoAdZgeHu RSpPsFXa0RWmWJFnNMai2M8cSjU+b+7uh6z7wPwyQmBW/SLomvOMFXf3Wi6/cFkF7zUY qWyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2-v6si2401485plt.112.2018.09.20.06.13.58; Thu, 20 Sep 2018 06:14:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387706AbeITS5R (ORCPT + 99 others); Thu, 20 Sep 2018 14:57:17 -0400 Received: from ozlabs.org ([203.11.71.1]:33929 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387570AbeITS5R (ORCPT ); Thu, 20 Sep 2018 14:57:17 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42GHHH2DGVz9sBZ; Thu, 20 Sep 2018 23:13:46 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Joe Perches , Christophe Leroy , Andy Whitcroft Cc: Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: Checkpatch bad Warning (Re: [PATCH] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()) In-Reply-To: <595c96f5adcccd7eab9dc95eb48618981af66d3c.camel@perches.com> References: <872199441fd43b05fc1c7d049098ef7c0e83f4c5.1537262646.git.christophe.leroy@c-s.fr> <2f5f572a-a28c-9d17-844b-9e1961febf64@c-s.fr> <595c96f5adcccd7eab9dc95eb48618981af66d3c.camel@perches.com> Date: Thu, 20 Sep 2018 23:13:43 +1000 Message-ID: <87worgia60.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joe Perches writes: > On Tue, 2018-09-18 at 09:33 +0000, Christophe Leroy wrote: >> On the below patch, checkpatch reports >> >> WARNING: struct kgdb_arch should normally be const >> #127: FILE: arch/powerpc/kernel/kgdb.c:480: >> +struct kgdb_arch arch_kgdb_ops; >> >> But when I add 'const', I get compilation failure > > So don't add const. > > checkpatch is stupid. You are not. > > _Always_ take checkpatch bleats with very > large grains of salt. > > Perhaps send a patch to remove kgbd_arch > from scripts/const_structs.checkpatch as > it seems not ever to be const. I think it could/should be const though, it just requires updating all arches. cheers