Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1543962pxb; Fri, 18 Feb 2022 09:54:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpFeT5J49mA+xJHWlP2Y+MfQOeUB7sjNRE7lS0YoC4OvLVOF2L2xTJhc+lBZY3PqtF5JTk X-Received: by 2002:a17:906:4a96:b0:6c5:5ea9:5366 with SMTP id x22-20020a1709064a9600b006c55ea95366mr7325010eju.473.1645206878113; Fri, 18 Feb 2022 09:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645206878; cv=none; d=google.com; s=arc-20160816; b=h43+pLSJvRuTzTnfu4TbO9BapzlTYto+xfxEwjrY37h/Wa06DpHexomJyroQBA9yf+ G1cD3kkMXg4IXViVvVTu/FqQs3Bn7aaq8BzGszIdNaPAt61BfJsVWYe0d6l10kho6zVo 25jsTTgZjxoFvCWrfNgzmYHChcAIe7QOEUquCY89HvowJbIzHuoeEJdhdpqdcL2dul6B OWNB0ho1M53HwuUGWPdrZ8h21w1M3Qgf3zwSwxjs5AvpfB+unQ040GtOG9FMAIqwrWtN Alr8EyxfqIy9eskMTTg7y0rlldqDHE7iTfSztf296UnwfRkTUJWsJ0uvxsS5tTMLcJvV vpCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=afcM4DQupixAxH0kc1FcSrJ62dkTTraEAu7alpgcE5k=; b=M3drpSu6POznAjuHchTSKZd4qmNZVJ1lDSB0RGhBaJwwXn9JiHIK54eTzCM1wEmUeS AE4cP9L7TeIVHZBh4N7sVlnW+9YAcyjOgDc+H6WXNu0Sj2JMWn87fYQWeAlMkoILStWJ X99Fi9j8nVQbsHEDhhaFTbuUJSbxjF8lotpsvq51WYOB8+xesltqDVy/6ySMVcDwW9nX JCMgjSGLYcFjrB/5EwhXKMFromzC5lVjaJdNWkwVO4gf1sdUr6haQBePJMtrVRVYCB1M RGDJVSHaBYZe+OlGNNsXcJiV6m8JlP4QTK5FOAJwqzkIBH2NWnr0snfNuHawhfN3KmPW Z1pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=T2FTHtJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11si6215002edr.504.2022.02.18.09.54.14; Fri, 18 Feb 2022 09:54:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20210112 header.b=T2FTHtJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbiBRRpy (ORCPT + 99 others); Fri, 18 Feb 2022 12:45:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238323AbiBRRpv (ORCPT ); Fri, 18 Feb 2022 12:45:51 -0500 Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8B69251E47 for ; Fri, 18 Feb 2022 09:45:34 -0800 (PST) Received: by mail-oo1-xc29.google.com with SMTP id e19-20020a4ab993000000b0031a98fe3a9dso4353318oop.6 for ; Fri, 18 Feb 2022 09:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=afcM4DQupixAxH0kc1FcSrJ62dkTTraEAu7alpgcE5k=; b=T2FTHtJlw2tz58RdWq5RP/pXsvqUojg0GbRxPQDEAZsbI5S3XxD3nc+uWjVc5kMo46 EVoPJlz3ZiGLQ97OD+P8Mz+CPb/quyO5wYs8zjn8cO9huLAmun9brZQb+K5PdUJfwhCa Gv9KcPoWfBCHCe4jeVU+iqa+belCW2JP35GX2LQzk0synQTcnKE22hM41CFe7yGJl15T PQJMoJYfZ5ITi3OuEmNpqyyc9avf4BlkQ8ie5Q0S506dpdzkwIoW2fYHQsaedQJLMS6U s3nb0vmjJ31wQMNN0x6J2Vc46Bw6y0DPLb03A/vYhscgM8HKBZKA/weNIbTO9DIHkyQi dT8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=afcM4DQupixAxH0kc1FcSrJ62dkTTraEAu7alpgcE5k=; b=S5vCBD6gVmubxX/rgIJopfQjjDR47OQgMTIrc6Pxu4Ix1ly1Hw2+75kYgIOSkqoo1/ 2yxKRik+mOe6mlJO9b3guibgdQskI+eyQc0F0P8Ci1Ue4tcFg6jIuPQjydVnNmaOCGH8 wfB2o4bwhx/VZH7aRyURJGrmtyj/8HmBIXFzHL88ufXIAvIOJ0pxKvLQSjIuRvPEBGXr Fj4BI8DepDdJZCe3+UTXqoAj64Nx8aMtD1B4cnrscy3KajvJUu8YXNJF0+wNqZhzy9Sc o66o7F8kyoVQioInHzLIOmtPh3ocd+lbxRjXzyTbPX0psGID1UyLaiX18ro8wEHMJ79R qDOQ== X-Gm-Message-State: AOAM531Yff8/p2FZW3jd81UT1jX3eecptGn4N9jYXpKISxZbd9IXe9Uq MZWrTnmviIstvd74+UVAgNg= X-Received: by 2002:a05:6870:75c6:b0:d3:5241:d4c0 with SMTP id de6-20020a05687075c600b000d35241d4c0mr3168966oab.19.1645206334092; Fri, 18 Feb 2022 09:45:34 -0800 (PST) Received: from [192.168.1.103] (cpe-24-31-246-181.kc.res.rr.com. [24.31.246.181]) by smtp.gmail.com with ESMTPSA id p22sm22691187oae.33.2022.02.18.09.45.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Feb 2022 09:45:33 -0800 (PST) Sender: Larry Finger Message-ID: Date: Fri, 18 Feb 2022 11:45:31 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH RFC] staging: r8188eu: comment about the chip's packet format Content-Language: en-US To: Dan Carpenter , Martin Kaiser Cc: Greg Kroah-Hartman , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220218092252.853807-1-martin@kaiser.cx> <20220218102227.GE2407@kadam> From: Larry Finger In-Reply-To: <20220218102227.GE2407@kadam> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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-kernel@vger.kernel.org On 2/18/22 04:22, Dan Carpenter wrote: > On Fri, Feb 18, 2022 at 10:22:53AM +0100, Martin Kaiser wrote: >> The structs phy_rx_agc_info and phy_status_rpt define parts of the >> header data that the r8188eu chipset sends to this driver via usb. >> >> Add a comment to clarify that we cannot modify the content of these >> structures and remove seemingly unused fields. >> >> Signed-off-by: Martin Kaiser >> --- >> >> Dear all, >> >> I experimented with "cleaning up" these structures and related code before >> discovering that their content comes from usb packets we receive from the >> r8188eu chipset. >> >> Would it make sense to add a word of warning to prevent others from >> repeating this exercise? > > Just the fact that these structs are endian means they're from the > firmware or the network. > > If a struct has a pointer in it, then it's rarely part of the UAPI but > if it has endian data then it probably is. Additionally, do not change any struct with the __packed attribute. Most will have endian variables as well, but not all will. Testing after modifying any struct is a necessity. Larry