From nobody Thu Jun 06 20:43:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VwGVy2LD4z5MxKY; Thu, 06 Jun 2024 20:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VwGVx6GlRz4qf5; Thu, 6 Jun 2024 20:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717706585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iiuOHe9p8L8yiQoso8K/I+bpf6vTD8nY8zZRaGI5wdM=; b=LU7h8IXTCjXYc6ABVugtMEYEqDoQsEG8n9gIVlEd1mo1RIuk/dQ/VmxNpRsJktTLMOOWZO YkREHo42VeCrU3tt5Z6Cva6srIlyZgZv5gwwHE/s9QXiA6kOr4zsAzKNKkZcUipcvFOcQK AJJ3sCc03w0Q+camyfiKi/G3guw8c/eVVXHh3OMkIWXWRVh601DdOveIHj8pVhJdR1Upkw zGq8lBMEFhQ3ospzKWtb+riouQQAFKCgTtVdBHkgdIkd01PzujbZ2iTVMIUC5EPDY8kTlg K7S1DYkBsQA6m4hueYGknWftJ2OE1OvbiizendP9aVvrAEdewg7XFStiEwjk5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717706585; a=rsa-sha256; cv=none; b=gxYQ9k0REg8I8l7nXgqQw4kSJcRWjLvgU9F+HjIZ6f04hA00muZjvGBLN6EWa1uvaSVphH MPOIS9YkkWBv1H8S0UdIDawjYrwJx/TMQsBqjn9a9uHAYWip2t8HRqJJJ1aNBhO3JD///c Efc2lI6gK/KkcmlwNxoQGNAQPTszsfiwCIC7BB3aC2HEsmLhjN9r6jooIjB8T6tHvaMzdo Odb4mg04ZXgaDpcZVgg4Iiih9xioh1bfy5UuPwfI4HIupF0EwyLfzGD7fuKyS1nIUN60FD a1sWa0tD7QtYgfHezJcB0Q4pmtu/EsaZV0Y/clnH1jxb3A4n3Os4NzKJTlnb3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717706585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iiuOHe9p8L8yiQoso8K/I+bpf6vTD8nY8zZRaGI5wdM=; b=CWh5zfa3KOjbQGFGJXAGb8zIZMBGsDmDImtStCT8MUiile6vsVRHQxO4Hk4H2yYE90JPV2 Hm6ZvU84evjZBpW01yxGlFJgRraM0OQT3gjsJmMjmy1r9mQeILKs+19Y1rqdvwAJGSrQlC s44C7qtZcY1mvKGgJNG2aCcWb43qm+hYl9m+00Zc2zoCNlWEeahSmb9kcCLecFuYmoyH4G hdQPDBSywdWK2ffuHpxhQlvGlIiS7IostACX7WN3JW1bjtCaf1niYRB/OzOGdX9vK0Yg4n HXO3S74nu7XYH6wLNTEjvWY46ldbBp7rWIrLgMwX+LQk3X4f0T5kSsuw5bP5ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VwGVx5tSjz11wj; Thu, 6 Jun 2024 20:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 456Kh50R046518; Thu, 6 Jun 2024 20:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 456Kh54e046515; Thu, 6 Jun 2024 20:43:05 GMT (envelope-from git) Date: Thu, 6 Jun 2024 20:43:05 GMT Message-Id: <202406062043.456Kh54e046515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: db42bd1f71b1 - main - LinuxKPI: Convert Linux integer types to ISO C99 in linux/kstrtox.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db42bd1f71b1a29b392aacbd5b7aaca4c8d7e85d Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=db42bd1f71b1a29b392aacbd5b7aaca4c8d7e85d commit db42bd1f71b1a29b392aacbd5b7aaca4c8d7e85d Author: Vladimir Kondratyev AuthorDate: 2024-06-06 20:42:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-06 20:42:07 +0000 LinuxKPI: Convert Linux integer types to ISO C99 in linux/kstrtox.h Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D45465 --- sys/compat/linuxkpi/common/include/linux/kstrtox.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kstrtox.h b/sys/compat/linuxkpi/common/include/linux/kstrtox.h index b723bd4a6fd0..0567aa99f7a4 100644 --- a/sys/compat/linuxkpi/common/include/linux/kstrtox.h +++ b/sys/compat/linuxkpi/common/include/linux/kstrtox.h @@ -137,7 +137,7 @@ kstrtouint(const char *cp, unsigned int base, unsigned int *res) } static inline int -kstrtou8(const char *cp, unsigned int base, u8 *res) +kstrtou8(const char *cp, unsigned int base, uint8_t *res) { char *end; unsigned long temp; @@ -149,13 +149,13 @@ kstrtou8(const char *cp, unsigned int base, u8 *res) end++; if (*cp == 0 || *end != 0) return (-EINVAL); - if (temp != (u8)temp) + if (temp != (uint8_t)temp) return (-ERANGE); return (0); } static inline int -kstrtou16(const char *cp, unsigned int base, u16 *res) +kstrtou16(const char *cp, unsigned int base, uint16_t *res) { char *end; unsigned long temp; @@ -167,20 +167,20 @@ kstrtou16(const char *cp, unsigned int base, u16 *res) end++; if (*cp == 0 || *end != 0) return (-EINVAL); - if (temp != (u16)temp) + if (temp != (uint16_t)temp) return (-ERANGE); return (0); } static inline int -kstrtou32(const char *cp, unsigned int base, u32 *res) +kstrtou32(const char *cp, unsigned int base, uint32_t *res) { return (kstrtouint(cp, base, res)); } static inline int -kstrtos64(const char *cp, unsigned int base, s64 *res) +kstrtos64(const char *cp, unsigned int base, int64_t *res) { char *end; @@ -197,7 +197,7 @@ kstrtos64(const char *cp, unsigned int base, s64 *res) static inline int kstrtoll(const char *cp, unsigned int base, long long *res) { - return (kstrtos64(cp, base, (s64 *)res)); + return (kstrtos64(cp, base, (int64_t *)res)); } static inline int @@ -218,7 +218,7 @@ kstrtou64(const char *cp, unsigned int base, u64 *res) static inline int kstrtoull(const char *cp, unsigned int base, unsigned long long *res) { - return (kstrtou64(cp, base, (u64 *)res)); + return (kstrtou64(cp, base, (uint64_t *)res)); } static inline int @@ -301,7 +301,7 @@ kstrtou32_from_user(const char __user *s, size_t count, unsigned int base, static inline int kstrtou8_from_user(const char __user *s, size_t count, unsigned int base, - u8 *p) + uint8_t *p) { char buf[8] = {};