Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1172068pxb; Wed, 6 Apr 2022 10:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDg342B4tOhBUAnNt6oZqkZTBw8ezZ84N8n3ZhtinP23yubNDoGwDjDOy4a1X0bGQEQSTd X-Received: by 2002:aa7:8686:0:b0:504:8eef:5828 with SMTP id d6-20020aa78686000000b005048eef5828mr447521pfo.5.1649265906510; Wed, 06 Apr 2022 10:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649265906; cv=none; d=google.com; s=arc-20160816; b=ML7auBjRySB3bZ5BuNQTqRj0J8iDddTd5JIuAFqv9y6s/NJiESW494AbeeTdmOY66r 2OYzUfgvys/oRyvX6FFvksdzY+MgA+bl/mJ7eRxqW5TCFCWd9c+Vk5PIw7AjwCWcDeDj SBLWnzdp2PLjBcBDv04leYmcDx4KmtmZ94YpJkbFc9xS1aE++yFja61fGp9CWkVRzQsh BjCXlSqbUEmqLUJfrU0fE3AXsR3j8VKS0xLgL9DTFMU+DGeF5WoW4SPcJEku3g1xh9Ux T+A17MCOGKwLnv6pNyZeExTaQK27CeO3HwPKvyLawJO9W1gDkC/NRYbwR4dDeh4/1SIc h+ig== 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:dkim-signature; bh=w6iSchx9lFhyjpK61bzcJVmVhG2NXDwd6TkOXAv31Ws=; b=ZZ97pntD4dPu4JlTJOMt7msjB7p37eykcI3BLGMQ0OeupGHA25ILw0Ra6RM7mOlPff ohepxh6n+VDV0FHr4y/8W0KXaIcyPrg9VQdLBnQWl80DApxisFTZaeEIGJTUqpDmVR8W mqaSC2hD5aYGUy11W7NOW8KgWDNlPEa+V+zoricnNnsqQuMtZsKsZxGyDcEOrjX2wklG NlLx9lz7HFOY+pxtSC9PPjcx1Cscj57mr5g26SOUfu7cQ+yd8SidyBUzg0chQWEziAlL JrygFRLXvMzU6mhHkv5bH6SVzW6VOfFSqfmf1PjE+PLqLSTI9QmoC/bU1QyQGGGsf6rs SUEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@stuerz.xyz header.s=mail header.b=sxOjwXum; dkim=pass header.i=@stuerz.xyz header.s=mail header.b=lYNMTcj9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=stuerz.xyz Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d37-20020a631d65000000b003816043ee58si16522142pgm.77.2022.04.06.10.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 10:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@stuerz.xyz header.s=mail header.b=sxOjwXum; dkim=pass header.i=@stuerz.xyz header.s=mail header.b=lYNMTcj9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=stuerz.xyz Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D985DEC4; Wed, 6 Apr 2022 10:24:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238987AbiDFR0E (ORCPT + 69 others); Wed, 6 Apr 2022 13:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239024AbiDFRZq (ORCPT ); Wed, 6 Apr 2022 13:25:46 -0400 Received: from stuerz.xyz (stuerz.xyz [IPv6:2001:19f0:5:15da:5400:3ff:fecc:7379]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55E644B93EC; Wed, 6 Apr 2022 08:24:45 -0700 (PDT) Received: by stuerz.xyz (Postfix, from userid 114) id 932D8FC6D8; Wed, 6 Apr 2022 15:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stuerz.xyz; s=mail; t=1649258684; bh=INTP7v0qhzz+7lqwwKVTY7o3YMQwp4+tE8jatZqfEwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sxOjwXumbrOBDSj+qQ6+Z+QIKxshoEgdUw5sDd6t9B4LkEWjZnMdnGgMr8LBGKrc3 9Zm+qv76gK3T3hXkN3joMf1PJusiqNlsbDI9jdQpj0D69indG3w9V7BJNIQDEAV2gj HTSNdxPn8mLNiA+ZrpE+sFs9PaJs6J4PFjy5WbEhTEx/hZ7HSJwjK2eQtHXTLtRB5h MhIsVAR3CDzXgbcICF4UVtBc6aQ34+vstusbDFJMCT+CF4GCfTGFPnP6soykq3XZis bnOlEKhTEDaFKMYscHgFSQ7Vx+dVREim3kinHULNcA6O4aSeN9r/wzJSCF/H/GlOt3 KXlUFYrQfZbRg== Received: from benni-fedora.. (unknown [IPv6:2a02:8109:a100:1a48::1e62]) by stuerz.xyz (Postfix) with ESMTPSA id 25AC1FBC37; Wed, 6 Apr 2022 15:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stuerz.xyz; s=mail; t=1649258682; bh=INTP7v0qhzz+7lqwwKVTY7o3YMQwp4+tE8jatZqfEwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lYNMTcj9ORTNLqRqbnfnQP1ZUlgWbAFI0DVI3rz/QKKJoxZo6PKkagU8x4MouJHeJ Mq9pLaQqq+L7+DuPCZCVunk/9ApSca9ZDodapyIqtm6MGhwcnVSaA2kwMTxzetokoL YmTV1dEQ1hV/lG9GFNtcRMlERb7FYqvH9fLJZdlxLECg1iuOqZP7ccNc+ir+r/PVYM I+GfyZhu6xSYnzQg+3rODEQNR4xAeYOsEtk5Z8xFvq5tTDH+dioBfNURFeoAsHLx27 1Hhd9UtXW5CinL/cku+hjS1pZJSlo0Lhoz/fElb6cYcMKRr+rh7ukXSSuI46OizQ2R swLgk/wZbPvRA== From: =?UTF-8?q?Benjamin=20St=C3=BCrz?= To: kvalo@kernel.org Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Benjamin=20St=C3=BCrz?= Subject: [PATCH v4 1/2] ray_cs: Improve card_status[] Date: Wed, 6 Apr 2022 17:22:46 +0200 Message-Id: <20220406152247.386267-2-benni@stuerz.xyz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406152247.386267-1-benni@stuerz.xyz> References: <20220406152247.386267-1-benni@stuerz.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FROM_SUSPICIOUS_NTLD, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Replace comments with C99's designated initializers to improve readability and maintainability. Signed-off-by: Benjamin Stürz --- drivers/net/wireless/ray_cs.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 87e98ab068ed..3df795dc3d9f 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -2529,20 +2529,23 @@ static void clear_interrupt(ray_dev_t *local) #define MAXDATA (PAGE_SIZE - 80) static const char *card_status[] = { - "Card inserted - uninitialized", /* 0 */ - "Card not downloaded", /* 1 */ - "Waiting for download parameters", /* 2 */ - "Card doing acquisition", /* 3 */ - "Acquisition complete", /* 4 */ - "Authentication complete", /* 5 */ - "Association complete", /* 6 */ - "???", "???", "???", "???", /* 7 8 9 10 undefined */ - "Card init error", /* 11 */ - "Download parameters error", /* 12 */ - "???", /* 13 */ - "Acquisition failed", /* 14 */ - "Authentication refused", /* 15 */ - "Association failed" /* 16 */ + [CARD_INSERTED] = "Card inserted - uninitialized", + [CARD_AWAITING_PARAM] = "Card not downloaded", + [CARD_DL_PARAM] = "Waiting for download parameters", + [CARD_DOING_ACQ] = "Card doing acquisition", + [CARD_ACQ_COMPLETE] = "Acquisition complete", + [CARD_AUTH_COMPLETE] = "Authentication complete", + [CARD_ASSOC_COMPLETE] = "Association complete", + [7] = "???", + [8] = "???", + [9] = "???", + [10] = "???", + [CARD_INIT_ERROR] = "Card init error", + [CARD_DL_PARAM_ERROR] = "Download parameters error", + [13] = "???", + [CARD_ACQ_FAILED] = "Acquisition failed", + [CARD_AUTH_REFUSED] = "Authentication refused", + [CARD_ASSOC_FAILED] = "Association failed" }; static const char *nettype[] = { "Adhoc", "Infra " }; -- 2.35.1