Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3279384imm; Mon, 8 Oct 2018 00:56:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV61eVWMDz9SGRJ9FrLmETqq6qdOOSpcntCKVbq7L3qFdYKveDxsRZQr0Ojmu1WTiEvz7yR3t X-Received: by 2002:a17:902:9696:: with SMTP id n22-v6mr22949989plp.212.1538985415305; Mon, 08 Oct 2018 00:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538985415; cv=none; d=google.com; s=arc-20160816; b=eitey5PMePTNZa/wuotABH8ygTypOncHehW7vxgPJRjeboGRc+RrN4lnIjAeOYjxn/ a8P2ZUOsJZuQR/qXhJHwNeN+JaUO1dIftTfseJfdxXW+8Ul6zSx2/GQ4+DfpxnBuBEiC AyAkH/okIq+bnQqFeHOTio8gk+w6YQYb85A5W0Wzf7+dcc9uEEskUTUcasTa8WKm/r6d 1jhksu1YAegyRkkZXsegj7jhDjQaYLMOwafvT9R9LRaB5bQ8DUpzMSq8uXNkbdhs+JRZ QGrgzTg7Pc2NpsRMawYy6Imf5Ob92EpSKUKlaAqXRfEPLutOtOxk7gV+Aebwq6dku+Zr vKug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:to :subject:from:dkim-signature; bh=zA01YImvXjUTOzIym6Ew0H7c11/qtNZ9sVNn6i+n30k=; b=L43TTWip1PhMaXKHK9iWakzg/Lht0oA5WZXsHey3YvkoFlK1xHpQ033CRfkpctzx0d scr72zHvSQsuj5OB9NMGoQzLY6HdaqMgPfwNrNQKkqZNimZlbhFxSY2bYUNEYNLuJZTx 8c8PZZoDv5eh8Toiqyywy3O723KY7mq8tZpe7sM6mshIrwVEluo996gwTkMYsz70EyRH tAu9vy1Fd0vnpStwLhEO/2c/qLVSpUJrC/QsoQa9J0n1skAvB8IlhWHJmqmRXI34yk0X 7Jhpj4BUXDKm8CEUkcaOvY60AxGCXfEz5D6hc/lOLahCIoFjGsJj9gUw9QV8JpQQ1/xp +j6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XuAN3Mwp; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3-v6si17384970plb.420.2018.10.08.00.56.40; Mon, 08 Oct 2018 00:56:55 -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=@gmail.com header.s=20161025 header.b=XuAN3Mwp; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbeJHPGk (ORCPT + 99 others); Mon, 8 Oct 2018 11:06:40 -0400 Received: from mail-lj1-f169.google.com ([209.85.208.169]:45825 "EHLO mail-lj1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbeJHPGj (ORCPT ); Mon, 8 Oct 2018 11:06:39 -0400 Received: by mail-lj1-f169.google.com with SMTP id j4-v6so13159597ljc.12 for ; Mon, 08 Oct 2018 00:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=zA01YImvXjUTOzIym6Ew0H7c11/qtNZ9sVNn6i+n30k=; b=XuAN3Mwps8AZqpy272QQ1JuKDenCvI1gSwtLZ/0uz06qsqN7yiKSeCw2bxRe4pqJlz eu/Cqj5r9RHOq4OnkGqPaIZstwLPzo1C1LziIxMwIXHqHXgtRmxRG+XkjqajRZGnrpuv 7OSU/dHUTHcnAgt/vwVXTTxiql00gzZR+WaHxDdMf975O3r1TzROfuDkYLnBvWfKVVcE DqAKBxxHpZkdjUs92OuIOW4vi516JLE+4LZaWKv8gMQ3+ymtIESKxZUm4szrImk/tQu7 rxkDti4c2aa5JI56tC8B6VUtRxoZU3BBCysK9taOIhrhSX44KPdp+MQoHqqCN90iY/Gd u5lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=zA01YImvXjUTOzIym6Ew0H7c11/qtNZ9sVNn6i+n30k=; b=oEW9RtSumQelVXQX75N6FQtVSm+HyCrGMGmGh7X289LRRa8ZnogBPTcO4dbBjjGjuo zyQ+/k1np4RnyW+/5j88QAa5Ags0GpDW3lvknoICxcf0XLtscs82hlbV05+denC10K96 H+Tij+2nFuO6eBy2fAPiLmDLAw6J5yDGNUhsUJEHx04toDE1ggfE3ccVS+h4G6wYOKrx lVfj8+ivOh2W6XMvMmVPurJKkIc+sZU25TEZ/l6luTiA2NZZWWlVPR2alGP8/+y3SsYx cdwHo7lJBhBiOTnQcbguXUQEpVEaXAwo8F4HY3GV9CQKELl4lpfv/0IaU9BKfn7/Ertv rNCw== X-Gm-Message-State: ABuFfoh/5rt9oQRVvyAf4/jqYirug6/H0tXlwXWSF3Nk+npZEs5shhX/ NFvZq9xzc0lipJuinDiTnWe02fJe X-Received: by 2002:a2e:20da:: with SMTP id g87-v6mr12178414lji.88.1538985372145; Mon, 08 Oct 2018 00:56:12 -0700 (PDT) Received: from [192.168.10.160] (91-159-62-140.elisa-laajakaista.fi. [91.159.62.140]) by smtp.gmail.com with ESMTPSA id f73-v6sm3449600lfl.80.2018.10.08.00.56.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 00:56:11 -0700 (PDT) From: Igor Stoppa Subject: CHECKPATCH: strange warning on alignment modifier To: Andy Whitcroft , Joe Perches Cc: Linux Kernel Mailing List Message-ID: <15d77776-0551-5b7d-935e-16496c3800e2@gmail.com> Date: Mon, 8 Oct 2018 10:56:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I have the following fragment of code: +struct my_struct { + atomic_long_t l __aligned(sizeof(atomic_long_t)); +} __aligned(sizeof(atomic_long_t)); triggering this warning, when fed to checkpatch.pl: WARNING: function definition argument 'atomic_long_t' should also have an identifier name #19: FILE: path/to/file.h + atomic_long_t l __aligned(sizeof(atomic_long_t)); gcc [(Ubuntu 7.3.0-16ubuntu3) 7.3.0] seems to be happy about it I am using the HEAD from mainline. My intent is to specify the alignment of both the field and the structure (yes, probably redundant in this single-field case). If I am doing something wrong, I can't figure out what it is, but I don't understand why the WARNING is mentioning a function definition. -- igor