Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp507578imw; Wed, 13 Jul 2022 02:47:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uutx7YWb/bb3tgsi+JQPJKVzRu1N8FuIIOMZzdxtD1K4Wkv7fq8V4kn/dur4/kaKH/3wDF X-Received: by 2002:a17:90b:38c5:b0:1ef:a7ad:ebb9 with SMTP id nn5-20020a17090b38c500b001efa7adebb9mr9609838pjb.110.1657705639696; Wed, 13 Jul 2022 02:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705639; cv=none; d=google.com; s=arc-20160816; b=zVPD9bYdCnBJ+MS0ja/8V3XGLO5cIXLHLVjuVkmi1BqcLWir8fcMWuJ1rSmDarjRZw M9cP6et003hB7dvFfGLBnv9MNTmmfAQVyVzZgTFUkU445FVKU4r+iO8NSzuoa7IsAtwO jOZ5kstvIb9SGXlhxXpB2zcuh8zp3z+Hi45E0UGrvaa9rjtkqw7XiZSdbxsfGCdQLxS1 sJi0a1EtCirazre9mRh1eNJ+xQD9TFzm+c+/9FAReuGRm+iXnLXSfmBFzw/oh8iGLTuS Jxcqd9FcSO4k71r9v9CvYdBanOjntrcQ5nbPJAUlBm9Xz2WxA7JfVJVAq0HVrOKcNpjh pcxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YsOAagzrDZwSOgmh3robiZfSaIhx3MZUpw86AdzFWpY=; b=puvBHve+fHUQNoy9zo5c1nKtMYcd6E/h6t3UacCzUzMNPDVfd46+zGmSHwgC5jwI62 A+a502X5TKdc7lUKb7A9RQbLshctme9UP9ZcgdQypQL+nNrpCROicJfkfJJxwaFfKUXF 6TB0TuH9E/hd2ePnBqrtUsyKQRgeENOOdNGC1Fz0nWSYr0re0i/rws0+Exy0GNGR61bY grNxklYYvL72e4DMHNqCZOPzgFacExYmIXuk+2d6K6fapSYym1cb7CEu5KEM0VR2UEGC ZSd+hyut/5VJmzCn51O1IngN+sPBSvzAAGUXG1s6M8ifor19d7pzTSeofwyREzTJP2eT 4kyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=q1p1TllB; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q190-20020a632ac7000000b00415d29fb2ccsi17302604pgq.625.2022.07.13.02.47.12; Wed, 13 Jul 2022 02:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=q1p1TllB; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235226AbiGMJp2 (ORCPT + 65 others); Wed, 13 Jul 2022 05:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235701AbiGMJpL (ORCPT ); Wed, 13 Jul 2022 05:45:11 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40E40BFACF for ; Wed, 13 Jul 2022 02:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=YsOAagzrDZwSOgmh3robiZfSaIhx3MZUpw86AdzFWpY=; t=1657705511; x=1658915111; b=q1p1TllB+8pe1owvx8kRW7qyEjuOVYGpl0SKlfcrRvwj37x EpZtzhQmbKEdMZGxM+aASWIgzUeUKDwEmexn2ZY/8zfGMFEDTP1wqpp/A7At7RD9vcMpvzeXXTcPK LgoSM/trQA/ycZSOe+ngVDwf6u9QHM64tWSo9tkBDTfRzC4PJ6Ae5Wxkk0WjFe5CqU7oPrdVL8Ks7 UY3PrJsRENGQn7StL02kp+DWoyMI1hkbvIaOzm2co/MUDaDzIS3mzelUbUKCV1bUSdpYoQfvP2SIe s+eyo0mGa1Opc8bvbxRUdRNV3vrVkHsx0+OAVcs3AXz1NxBFXGTvMiMo7Zy4v2aQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvd-00EgvB-90; Wed, 13 Jul 2022 11:45:09 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 16/76] wifi: cfg80211: make cfg80211_auth_request::key_idx signed Date: Wed, 13 Jul 2022 11:44:02 +0200 Message-Id: <20220713114425.df55e53b473d.I37ad568e7118b4a8a93f5317d0f0ab5a8c164cf5@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg We might assign -1 to it in some cases when key is NULL, which means the key_idx isn't used but can lead to a warning from static checkers such as smatch. Make the struct member signed simply to avoid that, we only need a range of -1..3 anyway. Signed-off-by: Johannes Berg --- include/net/cfg80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d4632b391a15..e50b93160319 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2773,7 +2773,8 @@ struct cfg80211_auth_request { size_t ie_len; enum nl80211_auth_type auth_type; const u8 *key; - u8 key_len, key_idx; + u8 key_len; + s8 key_idx; const u8 *auth_data; size_t auth_data_len; s8 link_id; -- 2.36.1