From patchwork Fri Oct 6 13:04:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 822401 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="aHKcKRkk"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3y7qhv17Nwz9t41 for ; Sat, 7 Oct 2017 00:09:02 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6C76AC21D7E; Fri, 6 Oct 2017 13:07:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E3129C21DC3; Fri, 6 Oct 2017 13:06:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B1210C21C34; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id F40DEC21C34 for ; Fri, 6 Oct 2017 13:06:50 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTP id 9E0006181E; Fri, 6 Oct 2017 15:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1507295210; bh=8oZzQGEQwaqYJkqu6JzKGuJM6uaaXLIkD9vF3or0/Wo=; h=From:To:Date; b=aHKcKRkkl7Wnu6DC6K+qvLwYrUfo2ZiSBUzJH4KFJDzuuK+7vWz1Q4iIIdFGElWON giftoeIvY23JxnAJfqrYyCMTdpBJneNIUdcWuBWfxzu5p4Qv9kx886UPUXpCSvLUOK VfC7bUL2Fj8cWA0pnQ9S0UMQsyFTmm2VCUHsQd5Y= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Fri, 6 Oct 2017 15:04:56 +0200 Message-Id: <20171006130459.29127-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.13.6 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Subject: [U-Boot] [PATCH 1/4] linux/time.h: Remove dead code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since rem = ((long) *tim_p) % SECSPERDAY; the second while cycle while (rem >= SECSPERDAY) is dead. Reported-by: Coverity (CID: 167334) Signed-off-by: Marek Behun --- include/linux/time.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/time.h b/include/linux/time.h index bf12b99d37..b8d298eb4d 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -93,11 +93,6 @@ _DEFUN (localtime_r, (tim_p, res), rem += SECSPERDAY; --days; } - while (rem >= SECSPERDAY) - { - rem -= SECSPERDAY; - ++days; - } /* compute hour, min, and sec */ res->tm_hour = (int) (rem / SECSPERHOUR); From patchwork Fri Oct 6 13:04:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 822398 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="GsNE1Zx+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3y7qgB4z98z9t2f for ; Sat, 7 Oct 2017 00:07:34 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 36DFBC21E08; Fri, 6 Oct 2017 13:07:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 117D0C21D6A; Fri, 6 Oct 2017 13:06:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7F6D2C21C40; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 01D14C21C40 for ; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTP id AF94562318; Fri, 6 Oct 2017 15:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1507295210; bh=p8K3eA9oMHBhK3jvezmNd+ph8M4AVPw5M1EfFbPa0m8=; h=From:To:Date; b=GsNE1Zx+YtxJVx+QnGT5qvhqAO8mpyqVLZedpIwGYXabm9i7bnENvbKt/NNhJjEpb s9rowks7UWdKNYOOutPwI+1ELy1Z2SONQciF7R2V/o7R9UQKKyifKpKpOx/FSQHy/9 NEGKPTbDLOVfrqmrmvYCYeaQf+jrvd3mBAEh8HtA= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Fri, 6 Oct 2017 15:04:57 +0200 Message-Id: <20171006130459.29127-2-marek.behun@nic.cz> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171006130459.29127-1-marek.behun@nic.cz> References: <20171006130459.29127-1-marek.behun@nic.cz> X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Subject: [U-Boot] [PATCH 2/4] fs: btrfs: Fix usage of uninitialized variables X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The variable res should be initialized to 0 in these functions, because if the searched key is not found, the variable is used uninitialized. Reported-by: Coverity (CID: 167335) Reported-by: Coverity (CID: 167336) Reported-by: Coverity (CID: 167337) Signed-off-by: Marek Behun --- fs/btrfs/chunk-map.c | 2 +- fs/btrfs/dir-item.c | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/chunk-map.c b/fs/btrfs/chunk-map.c index 48407f3331..ce7330b1b7 100644 --- a/fs/btrfs/chunk-map.c +++ b/fs/btrfs/chunk-map.c @@ -147,7 +147,7 @@ int btrfs_read_chunk_tree(void) struct btrfs_path path; struct btrfs_key key, *found_key; struct btrfs_chunk *chunk; - int res; + int res = 0; key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; key.type = BTRFS_CHUNK_ITEM_KEY; diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index decf86eb53..970563404f 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c @@ -93,7 +93,7 @@ int btrfs_readdir(const struct btrfs_root *root, u64 dir, struct btrfs_path path; struct btrfs_key key, *found_key; struct btrfs_dir_item *item; - int res; + int res = 0; key.objectid = dir; key.type = BTRFS_DIR_INDEX_KEY; diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0d3da28296..0af04278a3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -324,7 +324,7 @@ u64 btrfs_file_read(const struct btrfs_root *root, u64 inr, u64 offset, struct btrfs_path path; struct btrfs_key key; struct btrfs_file_extent_item *extent; - int res; + int res = 0; u64 rd, rd_all = -1ULL; key.objectid = inr; From patchwork Fri Oct 6 13:04:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 822399 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="M9cIOGri"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3y7qgT6Qk4z9ryr for ; Sat, 7 Oct 2017 00:07:49 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 8B55EC21D80; Fri, 6 Oct 2017 13:07:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D1AF9C21DA2; Fri, 6 Oct 2017 13:06:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 973FDC21C54; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 027D5C21C4C for ; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTP id B7B696235F; Fri, 6 Oct 2017 15:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1507295210; bh=+Ard+j0E6erVVyRxcuo5HgadntbyX+7K4VHHYw8nEaM=; h=From:To:Date; b=M9cIOGriNeNI/hRDfa6/ol6zDm/TPQdoJui0EWyuICOm09Cz7MBqMSmJBz1EsFYFr 4V4UibgCPv/dYje/9aoZZdjY3iDtn/hzSietpOmP+CIMyA6xHKwK1GHxsspTFiFA7d Xpm4XTQSd0noTetb6gbvOtRSTiTrPCy3mFU8UycM= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Fri, 6 Oct 2017 15:04:58 +0200 Message-Id: <20171006130459.29127-3-marek.behun@nic.cz> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171006130459.29127-1-marek.behun@nic.cz> References: <20171006130459.29127-1-marek.behun@nic.cz> X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Subject: [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf length modifier X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Change %lu to %u. The compiler issues a warning otherwise. Signed-off-by: Marek Behun --- fs/btrfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 2529c2b3b6..706286ee2d 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -147,7 +147,7 @@ static int btrfs_check_super(struct btrfs_super_block *sb) if (sb->sys_chunk_array_size < sizeof(struct btrfs_key) + sizeof(struct btrfs_chunk)) { - printf("%s: system chunk array too small %u < %lu\n", __func__, + printf("%s: system chunk array too small %u < %u\n", __func__, sb->sys_chunk_array_size, (u32) sizeof(struct btrfs_key) + sizeof(struct btrfs_chunk)); ret = -1; From patchwork Fri Oct 6 13:04:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 822397 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="BFar+hnG"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3y7qfc0m0Sz9sPt for ; Sat, 7 Oct 2017 00:07:02 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 717AFC21E05; Fri, 6 Oct 2017 13:06:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 49827C21C40; Fri, 6 Oct 2017 13:06:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6F30CC21C62; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 1931CC21C54 for ; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTP id C6DD162378; Fri, 6 Oct 2017 15:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1507295210; bh=7Y+9pnhOjVzqgdm0E0hxZbozMbHTBjO53WOuVoLtvLI=; h=From:To:Date; b=BFar+hnGtYE84ikFwAr8LyBj87+Ul8VU426xmcPHt5/pkBPoHdGc6YaSfhl4uR3L+ ntIRl1PRCrmFFMrXNrAFt+RK4j8zi1953l7X5LYFWwFBzeZ/qYUP8ZBzDRFOLu1Oet y7TuKwWPb+OjuthIEBW917lnHaWIqIMCpNj6nkB4= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Fri, 6 Oct 2017 15:04:59 +0200 Message-Id: <20171006130459.29127-4-marek.behun@nic.cz> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171006130459.29127-1-marek.behun@nic.cz> References: <20171006130459.29127-1-marek.behun@nic.cz> X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Subject: [U-Boot] [PATCH 4/4] fs: btrfs: Remove a foreign language note X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" I accidentaly left a foreign language note in the code from development. Signed-off-by: Marek Behun --- fs/btrfs/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0af04278a3..f785b600fa 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -210,7 +210,6 @@ static inline const char *skip_current_directories(const char *cur) return cur; } -/* inode.c, musi vratit aj root stromu kde sa inoda najde */ u64 btrfs_lookup_path(struct btrfs_root *root, u64 inr, const char *path, u8 *type_p, struct btrfs_inode_item *inode_item_p, int symlink_limit)