Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp4004834ybd; Tue, 25 Jun 2019 12:16:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdhvFZS92JpO0DsJQnCaIxlSEMJYlqQqf6C2DAUhIRdIcTR+w9QxlzOKQa3GvWNHxb6/fS X-Received: by 2002:a63:5158:: with SMTP id r24mr39995658pgl.79.1561490204940; Tue, 25 Jun 2019 12:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561490204; cv=none; d=google.com; s=arc-20160816; b=HI4ZRzQVDvSjmDrS6FgjyoVpDqKqKeRezrwyZI8q4f2hmjtbWR4PKIFSqyq9W5O+gq d3WniT18uvWchlKKGk9BKQ8S28yiVDfIXNH8LOr+CLEGQXPukBN+Zx1q0vFh72UjhIHW hhtivid+1nLSnDCndbFvn1sAbE2L1qxHT3Viwq0/3hIdtz0yLmfK63S/ee3/ijwScpZG Njve751IR7hx6cAoP4h6nOY0kdN+AWrpEj4JEgARGDCO9GqCum917KHQUDICJrh4FHan SvTRBJ8/PX9kfonf4Smglow++jReHyPzkUXneUTcJ7hl8KizFqIfiUYu5qZcqi20I+he LhZw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Qze1UfAhl4kUILZ8bAOXSJDDeEGQR/RdWZXcYOuYtxY=; b=i7QFPgjbvFPZHtpzC0SmfueIKB6wb9ivZs9Nypw9okDpjmiKfyqDyh3U2y1dq8n+Ah JjCSxQ5nInx6TdR6p3YZ9KGEAyFPERLaAYQ23PykUezjW4MB/4FS5awHFShHR1dnsDyG AWY8r+BRXaiGKCj5Pfa0lyh92ktNfLz/6p0eH1rnonYHAmsrQwRhIgtIc+n6vey+/Bbr NPmxYMf6vhc4J7+jQcWAP5pA5v+tS5R25QDMH5v3+Sy6yYPckUFUscQJQ9h59yT+r1pI PASC1g2hcLPJfLGR0q/maZJLyzcFe513YK2johJcbVAZEu9ba/G9mU/rCMl0CxeCoI7n DQSg== 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 s6si1031333plp.229.2019.06.25.12.16.16; Tue, 25 Jun 2019 12:16:44 -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 S1731101AbfFYPXO convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Jun 2019 11:23:14 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:33280 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728559AbfFYPXN (ORCPT ); Tue, 25 Jun 2019 11:23:13 -0400 Received: by mail-ot1-f67.google.com with SMTP id i4so17893210otk.0 for ; Tue, 25 Jun 2019 08:23:13 -0700 (PDT) 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:content-transfer-encoding; bh=gRnFrYoEfNfsdoVhVQW0Fet9FOWwAVGxt1dsfE11KLs=; b=gsQ05BH1W2doRe9AhawoKzkKtJi/NImQA31FF/d5awDQMGYWcnvJnFmTnoA1325Sjj w8hiLsiMlwwYf7brouFjVSYjMNrdf7yQJsiUp/82lxKMtkjRNCqmwpUCPYlg6GhmsqOL C84T69gewCl/WaN5q3/yqfkpItmysVvLMApBvMv91kABB4VK9kcV5u0o6CxiNEA8EEve f3kzGRyNTu5dzPOepqeDl+b41qFB471aiVmVsctC2XIcth15t5rZiOBf054xxliPKCus O9Bbemqo6GQAjqZkIBlBJhYMZkeHymen3ZG3m32q6FbOjuo3lTFGc0VR1nWiUrWwNF4Z jJIg== X-Gm-Message-State: APjAAAV2HN9O22/L1f/5f2VPCe4o7xXwc+6CKDmXOaypUazN/Ci1+DTO Kv1/wRyuUpxP7S2XjR18hOzSGy4/OPR3atavQc4= X-Received: by 2002:a9d:2f03:: with SMTP id h3mr91953526otb.107.1561476193134; Tue, 25 Jun 2019 08:23:13 -0700 (PDT) MIME-Version: 1.0 References: <20190614150638.28383-1-piotrs@cadence.com> <20190614150956.31244-1-piotrs@cadence.com> <20190625130231.GA31865@global.cadence.com> <20110899-d456-8403-f9be-663be5fcd07e@gmail.com> In-Reply-To: <20110899-d456-8403-f9be-663be5fcd07e@gmail.com> From: Geert Uytterhoeven Date: Tue, 25 Jun 2019 17:23:01 +0200 Message-ID: Subject: Re: [v3 1/2] mtd: nand: Add Cadence NAND controller driver To: Dmitry Osipenko Cc: Piotr Sroka , Linux Kernel Mailing List , Boris Brezillon , Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Paul Burton , Arnd Bergmann , Marcel Ziswiler , Stefan Agner , MTD Maling List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 4:45 PM Dmitry Osipenko wrote: > 25.06.2019 16:02, Piotr Sroka пишет: > > The 06/16/2019 16:42, Dmitry Osipenko wrote: > >> 14.06.2019 18:09, Piotr Sroka пишет: > >>> +/* Cadnence NAND flash controller capabilities get from driver data. */ > >>> +struct cadence_nand_dt_devdata { > >>> + /* Skew value of the output signals of the NAND Flash interface. */ > >>> + u32 if_skew; > >>> + /* It informs if aging feature in the DLL PHY supported. */ > >>> + u8 phy_dll_aging; > >>> + /* > >>> + * It informs if per bit deskew for read and write path in > >>> + * the PHY is supported. > >>> + */ > >>> + u8 phy_per_bit_deskew; > >>> + /* It informs if slave DMA interface is connected to DMA engine. */ > >>> + u8 has_dma; > >> > >> There is no needed to dedicate 8 bits to a variable if you only care about a single > >> bit. You may write this as: > >> > >> bool has_dma : 1; > > I modified it locally but it looks that checkpatch does not like such > > notation > > "WARNING: Avoid using bool as bitfield. Prefer bool bitfields as > > unsigned int or u<8|16|32>" > > So maybe I will leave it as is. > > You may also use the "u8 : 1" form then, to satisfy the checkpatch. Probably > "unsigned int : 1" will be the best in this case, it's up to you. Exactly. The compiler will allocate the sufficient amount of space to store the bitfield. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds