Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2809040pxb; Mon, 18 Apr 2022 08:40:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6Ju1IGxgmhIj1zB5gV7I+kUZwOaOqr0kgw4n95e5YI29Mt6zpY/ptCn0mdZnzgy5Tbvp4 X-Received: by 2002:a17:90a:8583:b0:1d0:ad7f:2452 with SMTP id m3-20020a17090a858300b001d0ad7f2452mr13449655pjn.203.1650296452123; Mon, 18 Apr 2022 08:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650296452; cv=none; d=google.com; s=arc-20160816; b=B0Tlicgs37UglffFUQTVGcTVHLGRj3l1WhppXIx19aOxzVWAcseTKGIVu9iVl6CCbo zRaB8d99Y26xPypzc2+s+4dLP+fJh6OUaB1Wjqxyl3uU9ZW7ifkh6nzRDkj3hvnH3uMC W/P9VWugn6hvAaIMR17UQDde6mBY/NTzbNsO+vbQ44erjsV9wLbr8BZuSyVWY1OQcbpy DvPfwYFzbkDfWH3Yf4kXpBiOTN0qVD/lDSmVHsLGdurqi2oTaaIIFxWgHCL71onoqmeb kpxEMxZxQZ29UMRi55jbj/Ys6T52uN6LcoFH0zuhlBvzVN8vUAjD36Jlapzj1T6CxcBI 0SFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=11k6R9SBtFLWZol5I6WXNprdajdqidH2FBi8OsH9inE=; b=1Bs+l+4RIJAGFSVX0Q0cgcSSdG+RhXhSvFQ/lwZj8l2TWlakF6shtgyhKixp34sdeF 3O6qe1Z9y/O7QWCLygmW8xXkvZxazqhDoFSSdaBtZqcgbMYgTuydsRNEj6oAgo1muVuh lWoDUPfhOUbec8Kv+KNMXSZg/eAeU2SjQuLriHOrUBBvuRnnwXyX0GbSnPMafJtYAHuQ UaNv5DiTHtf7frhazXei6Metxu7UnSYEF3eFNtVdE5XcQfRsWBTvMvRz752FBayL//WD SB+5W417cmutevzRUjrv9as9qnDtN4gr604rRT/+18BgOplpdkV5RsWTQvEFIqrnqTYh 6gnw== ARC-Authentication-Results: i=1; mx.google.com; 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 b16-20020a6567d0000000b003a322fbab35si9131980pgs.158.2022.04.18.08.40.35; Mon, 18 Apr 2022 08:40:52 -0700 (PDT) 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; 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 S233858AbiDQKgc (ORCPT + 99 others); Sun, 17 Apr 2022 06:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbiDQKgb (ORCPT ); Sun, 17 Apr 2022 06:36:31 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C642E36169 for ; Sun, 17 Apr 2022 03:33:56 -0700 (PDT) Received: from martin by viti.kaiser.cx with local (Exim 4.89) (envelope-from ) id 1ng2E4-0002Nz-GJ; Sun, 17 Apr 2022 12:33:52 +0200 Date: Sun, 17 Apr 2022 12:33:52 +0200 From: Martin Kaiser To: Pavel Skripkin Cc: Greg Kroah-Hartman , Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] staging: r8188eu: merge _mgt_dispatcher into mgt_dispatcher Message-ID: <20220417103352.jqkqpi2auxir2g6g@viti.kaiser.cx> References: <20220413200742.276806-1-martin@kaiser.cx> <20220413200742.276806-3-martin@kaiser.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: Martin Kaiser X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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-kernel@vger.kernel.org Hi Pavel, Thus wrote Pavel Skripkin (paskripkin@gmail.com): > On 4/13/22 23:07, Martin Kaiser wrote: > > All that the _mgt_dispatcher function does is to call a function from > > a function pointer. It's not worth having a separate function for this. > > Merge _mgt_dispatcher into mgt_dispatcher. > > Signed-off-by: Martin Kaiser > > --- > [code snip] > > + > > + if (ptable->func) { > > + /* receive the frames that ra(a1) is my address or ra(a1) is bc address. */ > > + if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) && > > + !is_broadcast_ether_addr(GetAddr1Ptr(pframe))) > > + return; > > + ptable->func(padapter, precv_frame); > > + } > > } > Looks like each `mlme_sta_tbl` element has `func` member initialized. I > think, we can remove this check. I've just sent a series to refactor mgt_dispatcher. All mlme_sta_tbl entries have a function pointer, but some of the point to a dummy function DoReserved. I guess we should use NULL and keep the check instead of calling a function that does nothing. Best regards, Martin