From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67208C4338F for ; Thu, 5 Aug 2021 10:10:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C4866112D for ; Thu, 5 Aug 2021 10:10:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240436AbhHEKKc (ORCPT ); Thu, 5 Aug 2021 06:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240427AbhHEKK3 (ORCPT ); Thu, 5 Aug 2021 06:10:29 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D847C061765 for ; Thu, 5 Aug 2021 03:10:15 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id m9so6343827ljp.7 for ; Thu, 05 Aug 2021 03:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nowSQTwIvjMrJLGQCHoXonlYyJagP1iBzjQYAek7DVs=; b=e/aiO0Bt4icpPm8iEuxXKkOAsi20JskuEOnSLD+eLZcvEd+eavU6nwr93xUqDJZXDv 7Z/EgD2MD1pFCZAKommQKBlPW1156tm0UL45YxB39hhpSZfcIQgIJvDKTjbVDTqMUbKs LAH065WtHpLiD5Y6c9xyWLBQmKksYuzuCC+PJz3tRv0obo0EPXK3H9y1MgMOsuombDFv A06fMD0S+SRxruq9Dspd6+Xf+jPzL8opwPIBEXv0O+fI0t5xuVpA2SIHl7dx7TqF2hxZ WPBHkVrBPMDaC9wwMx/XBNjLdJ/tLs58t2TXErTAUhGlWxzz6UkLJNuoh8bHqqLrdce3 5pmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nowSQTwIvjMrJLGQCHoXonlYyJagP1iBzjQYAek7DVs=; b=jmL434DYzifJwo+pPKHOs6gys2wHvUCm+VQeXTKBu8umj5QkgN+tBIzPL0d7cUyDpr CqjA1vGsF+1yk8QfZPg8jKeAQr5pn8W77T6a4vFi0NI7eWhk961i0gVJHv+bkPbGQhTe HWx13/FfjGiyIiy5h6Q+r9+R618FCeFXebNrtH4yf/WFzjGs1a9N9RTo0Qe4T4HtB37A pBUelA+fs/4XGWAorqPhUW/Gwa/I4EbJYyP+G1I95WxnT91ou9qiJ48tIQKey5aVpScw JsZs9OkoJJWpCFPA4Rp8G9CSpL0d6uiGbACSU0hlpCkdKg6V34Gzk6rEGHPtDKG5d5Fb MjAQ== X-Gm-Message-State: AOAM532DXJzghAWAI4Dt8AerZuxfmuRm7m9twl0cL4rghvE3caCfpdYT ZGz6LNe4+OJVHTp21QEVbZ0= X-Google-Smtp-Source: ABdhPJynrbmgy4kOnT7WS7QMGB0ySgpXC/1ymWZ5BNVTaVdQPNIz+HorWO1QRpB3vdo6P8KWG68twg== X-Received: by 2002:a2e:a5ca:: with SMTP id n10mr2675619ljp.62.1628158213808; Thu, 05 Aug 2021 03:10:13 -0700 (PDT) Received: from [192.168.2.145] (46-138-65-182.dynamic.spd-mgts.ru. [46.138.65.182]) by smtp.googlemail.com with ESMTPSA id o19sm363587ljp.129.2021.08.05.03.10.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Aug 2021 03:10:13 -0700 (PDT) Subject: Re: [PATCH v2] brcmfmac: firmware: Fix firmware loading To: Linus Walleij Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , Kalle Valo , linux-wireless , Stefan Hansson , Arend van Spriel References: <20210804153434.3429348-1-linus.walleij@linaro.org> <0f439074-83ea-087d-7eec-aa6d4d3d4689@gmail.com> From: Dmitry Osipenko Message-ID: <1b958619-b86b-5265-0d3a-e3dd6bf47ee8@gmail.com> Date: Thu, 5 Aug 2021 13:10:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 05.08.2021 12:27, Linus Walleij пишет: >>> + } else { >>> + fwctx->tested_board_variant = true; >>> ret = request_firmware_nowait(THIS_MODULE, true, first->path, >>> fwctx->dev, GFP_KERNEL, fwctx, >>> - brcmf_fw_request_done); >>> + brcmf_fw_request_done_first); >>> } >>> if (ret < 0) >>> - brcmf_fw_request_done(NULL, fwctx); >>> + brcmf_fw_request_done_first(NULL, fwctx); >> This "else" can be replaced with: >> >> if (!alt_path || ret < 0) >> brcmf_fw_request_done(NULL, fwctx); > Sorry I don't quite get this... both branches of the if/else clause will > assign ret also if alt_path is set request_firmware_nowait() can return > nonzero and then brcmf_fw_request_done() needs to get > called? That call will request the first->path from brcmf_fw_request_done() since fw=NULL and fwctx->tested_board_variant=false. Hence the "else" branch can be omitted.