From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Thu, 06 Oct 2011 13:13:27 +0200 Subject: [U-Boot] [PATCH v2 1/3] misc:pmic:core New generic PMIC driver In-Reply-To: <4E8D7982.4070403@denx.de> References: <1314868412-2949-1-git-send-email-l.majewski@samsung.com> <1317707151-21803-1-git-send-email-l.majewski@samsung.com> <1317707151-21803-2-git-send-email-l.majewski@samsung.com> <4E8D7982.4070403@denx.de> Message-ID: <20111006131327.72af23d8@lmajewski.digital.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, I suppose you are talking about cases like the following: > #define CONFIG_SPI_FLASH_CS (1 | 121 << 8) Yes, this construct will cause range overflow. > +struct p_spi { > + unsigned char cs; > + unsigned char mode; > + unsigned char bitlen; Therefore the above variables need to be at least unsigned shorts. As you proposed they shall be unsigned int. On technical question: Shall I prepare the whole v3 patch series or only v3 for this single patch ([PATCH v2 1/3] misc:pmic:core New generic PMIC drive)? What would be easier for You or Wolfgang to pick? -- Best regards, Lukasz Majewski Samsung Poland R&D Center Platform Group