Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3286611ybi; Mon, 17 Jun 2019 21:14:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJvIBEFbbcEad69UPvzCkAU2ZikJbvyNb8V9bZikj486ODTpDndOTGsf3OgIs6MMFkEMde X-Received: by 2002:a17:90a:1b48:: with SMTP id q66mr2683066pjq.83.1560831244938; Mon, 17 Jun 2019 21:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560831244; cv=none; d=google.com; s=arc-20160816; b=pz/NZYe3WEmaXGYAk3CM1qjC2AsoatDutXiiYrILuu8ydrLoxFVKoOBKaK0UuXhmUp U49+/9NUmaFVOreGQ/svOBQ4Q672g4k+mbwonW6+4nZV56CrZ8A3vP8eP1DfmDKBM3fa 76wFghKP1sd4wU/j/UatQv8xlS+o00J4JCnplzyu+EW5xlkxzMmjnXMo469w2FSCsn+h PHqAw1BjR9CXONEo8cOj3BdRmVtbCJEmumjgO4cVDP3tkQtrzMuKe9uhoxIXbbD2KIvT YKhEjRvoOU03pBLsK0KBUfWcpXYNf3HCeezoOlBUomXuHlYI135/lSmjoxsCl7edvWOp AMrA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HAfVrRGqK9F22xtY9VWwoHp1OFzNIgxgu2VzK0MFrlA=; b=rZA5GfuLIDjm+f4E13KVS7fcD7XBeKJuIGEGS5Du4SwuSB20QvsMXC0ZF3sA/LWXxY +AaDLJnHLMltv8vJfve2iVa9nUrIkqyyEPqyaVzc92Hx7eyvm+WIATJxmu99on4NGt1i OUFHzsApHucxwnmsEBdA7HeUioZW61ygnZ0qnNaco5nnTNbrLtMWqWaXI0i07eQvsbR/ hP2SP4NCqMA52AcRQNt5xBrIKlRtwTKLYnP19kf60DH8wHE2Vr5m5vtaPr9mP9ITSbTk Uog4dPOMk8hP2gU8Cr6pOLAs4oF8+oIpu8uTNHtLtnNgBjNG+2LXRYaApwRJGYzwwyRC valw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Cx7MrBck; 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 l10si12509692pgk.276.2019.06.17.21.13.49; Mon, 17 Jun 2019 21:14:04 -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=Cx7MrBck; 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 S1725963AbfFRENp (ORCPT + 99 others); Tue, 18 Jun 2019 00:13:45 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34716 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725826AbfFRENo (ORCPT ); Tue, 18 Jun 2019 00:13:44 -0400 Received: by mail-pl1-f196.google.com with SMTP id i2so5122474plt.1 for ; Mon, 17 Jun 2019 21:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HAfVrRGqK9F22xtY9VWwoHp1OFzNIgxgu2VzK0MFrlA=; b=Cx7MrBckpG3pV2Jz77wAkDQV+G8/gS0yR99YJXl74q/uxr/lh4mIqYZ/TaVtgP0Pgn Lm41b5B3JhW6wfTSP44YLV8rB6h48vW8smzppBQcaujDKhyg6Po39RqODh5x1ZzcGWQr Hxu3fg30XhYkOAIDFWNMt+tVmloX873DQL83h4QyI9BP5TYRve5IqjOhOs1AtijW1lZC v8AgB2XXjG7GRDeCYGv+8E4O9mhGgfotKiBrjjnGadT1Ka8aW1CA90BrFlF7Pwm8a6Oq rrWX8byr+6zOtnS9pOZkR8pOfdHHALmIY6elhrq13K8zMvwUc9Ljq3Ojr4ndykkgapW2 AHcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HAfVrRGqK9F22xtY9VWwoHp1OFzNIgxgu2VzK0MFrlA=; b=inKlloH7C0HL6l+Yu9FtkO+MM0uRrPSoCPIVHqkuGsqDPWO6fgk8rYwS01AH3EJlBE JQLkeZS+cGtRPzjzRub3/JZ0Exvsum+xUKypPSV8mJnxm6RiMNybNiJKREga7fC4Ix08 nhBp9OvWJTUYWmcU1xeX2GII31D8M96SURtAp7HGcVDJHUejIZeqSZrYMi9s7MIv37TL 1f6i3K8dHE0UETAqna/MRNpzTnpOKVFVbHyvqs7XaSJ82ZBHJunVcf877b3bxvNqrFQJ oNMgSO0iWUkv+xlH7pcTS4zApGiay5dtSg5nIu0HpvI3QXMmxFRDovzLZhryzR7u0Gv5 kmHQ== X-Gm-Message-State: APjAAAUaVIrHNa9xzZ2pbwhyMgqOxhv14hd1tLy/NbFComTklUaR48cu 44e4XJsWI2wLld5Cuhfvpkg= X-Received: by 2002:a17:902:4222:: with SMTP id g31mr33758995pld.41.1560831224008; Mon, 17 Jun 2019 21:13:44 -0700 (PDT) Received: from localhost.localdomain ([112.196.181.128]) by smtp.googlemail.com with ESMTPSA id t2sm12836202pfh.166.2019.06.17.21.13.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 21:13:43 -0700 (PDT) From: Puranjay Mohan To: Shuah Khan Cc: Puranjay Mohan , linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] fs: cramfs_fs.h: Fix shifting signed 32-bit value by 31 bits problem Date: Tue, 18 Jun 2019 09:42:57 +0530 Message-Id: <20190618041257.5401-1-puranjay12@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix CRAMFS_BLK_FLAG_UNCOMPRESSED to use "U" cast to avoid shifting signed 32-bit value by 31 bits problem. This isn't a problem for kernel builds with gcc. This could be problem since this header is part of public API which could be included for builds using compilers that don't handle this condition safely resulting in undefined behavior. Signed-off-by: Puranjay Mohan --- RESEND - Added required mailing list in CC include/uapi/linux/cramfs_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/cramfs_fs.h b/include/uapi/linux/cramfs_fs.h index 6713669aa2ed..31df3e185b62 100644 --- a/include/uapi/linux/cramfs_fs.h +++ b/include/uapi/linux/cramfs_fs.h @@ -98,7 +98,7 @@ struct cramfs_super { * * That leaves room for 3 flag bits in the block pointer table. */ -#define CRAMFS_BLK_FLAG_UNCOMPRESSED (1 << 31) +#define CRAMFS_BLK_FLAG_UNCOMPRESSED (1U << 31) #define CRAMFS_BLK_FLAG_DIRECT_PTR (1 << 30) #define CRAMFS_BLK_FLAGS ( CRAMFS_BLK_FLAG_UNCOMPRESSED \ -- 2.21.0