Received: by 10.213.65.68 with SMTP id h4csp1741082imn; Sun, 1 Apr 2018 13:42:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx48hXDfpwsPkW3gvPUgberObj57/+rucgqrz29OEd0FgkeXT2vQaHrakNt+050FjbZtAWLF/ X-Received: by 10.99.47.4 with SMTP id v4mr4764059pgv.42.1522615361647; Sun, 01 Apr 2018 13:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522615361; cv=none; d=google.com; s=arc-20160816; b=yBqRD58KIC7BCJoRbt6s0Wll9vQ9fcrZ5LxWhxL5mxfUbvUJVlTASJ0HY0YVo11Yop h+AMxENxwbHsCPZSNVQyorFbfXIUgFo/gAmxRvNbEaHtzXp9IcgnG3WB17qvV/h1oI/h bHI4d5z59WyAc9DbEMwIOwVP3gL1n33f+bUtCAHTZVOMYe7xnR5vBkFCKKmp9/zeUPqU g9cO+f6XPupO8Kcv2egG+DKleMxlNl+JMuC2BLKBmymlFEznquWrHSfyZiYTzP5Kxu28 yS9tAbmRv+OKQPimMAA/Q9PXjRJoJcfvmAM4HyU1snoQrYZifJHOcsCAEZc//iw6IQHn 7i0Q== 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 :user-agent:references:in-reply-to:message-id:date:to:from:subject :organization:arc-authentication-results; bh=/nzokwEH5x+bBm7oIqx5NHIuCfYnmE28tEPnvs4EtCY=; b=Ydp9JSlKVLE8V4Ae+BqCLdKqeRI3BoAiFLhz9MnCxoyiuJgmbi+COt99ocqybv6G1p pCYa+lK4Btmfz7ozdOK3VjdLrBSKj/BpABDOebTb9mdwZNXkDXwQzoJV0UgoqsJUtbk9 cNrVBdKmvepuMS/NTpzkxY0s9zfJYambFUA94kgy4yh+wqoTKOeEkXQ4cwjzrZ8q0tof nisWnLt6w1auzFVVECllSjHUXZEPk4clj0XmBi1PJ4E2iDtHC7OPkfek0tG+86MujVl5 CAGdDxex5+VpMDjU1zKgXTeWH32UZmus9svyjfLIKaSAySb55TA5Yo0TkYF7EVW2r/b6 kDUA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si8778697pgn.791.2018.04.01.13.42.07; Sun, 01 Apr 2018 13:42:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754040AbeDAUkg (ORCPT + 99 others); Sun, 1 Apr 2018 16:40:36 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753999AbeDAUke (ORCPT ); Sun, 1 Apr 2018 16:40:34 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3DBC8EB700 for ; Sun, 1 Apr 2018 20:40:34 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-59.rdu2.redhat.com [10.10.120.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1BE0D7E08; Sun, 1 Apr 2018 20:40:33 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 03/45] Fix loop var in be32_to_cpu_array() and cpu_to_be32_array() From: David Howells To: linux-kernel@vger.kernel.org Date: Sun, 01 Apr 2018 21:40:33 +0100 Message-ID: <152261523340.30503.9462301336245251828.stgit@warthog.procyon.org.uk> In-Reply-To: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> References: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 01 Apr 2018 20:40:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 01 Apr 2018 20:40:34 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the loop variable in be32_to_cpu_array() and cpu_to_be32_array() to be a size_t like the variable it's limited by to avoid signed-unsigned comparison warnings. Signed-off-by: David Howells --- include/linux/byteorder/generic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 451aaa0786ae..4e297a6376d3 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h @@ -173,7 +173,7 @@ static inline void be64_add_cpu(__be64 *var, u64 val) static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) { - int i; + size_t i; for (i = 0; i < len; i++) dst[i] = cpu_to_be32(src[i]); @@ -181,7 +181,7 @@ static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len) { - int i; + size_t i; for (i = 0; i < len; i++) dst[i] = be32_to_cpu(src[i]);