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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 03997C4320A for ; Tue, 27 Jul 2021 13:40:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D96D061A8D for ; Tue, 27 Jul 2021 13:40:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232268AbhG0Nkr (ORCPT ); Tue, 27 Jul 2021 09:40:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232314AbhG0Nko (ORCPT ); Tue, 27 Jul 2021 09:40:44 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47CBDC061760 for ; Tue, 27 Jul 2021 06:40:44 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id y4so12136806ilp.0 for ; Tue, 27 Jul 2021 06:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QJojNdCNRZdeObtsdoaPzzj/IMsZp6P9O1kQugt1wqE=; b=XO6Dflo3jfQxB+ZjvaKObEax0uqfNoBdNWv4uPuHWMz3JVC94vavSgNOZfwad7WFK+ 6BqDKAPrvF5NbnboVNkt/ucxU9z0ncfICAFLEwMye6SlkKgkx2/de5SPelrUQU0cPKv/ UDw655RUl31r9icQLn45hsNbqVw45T/psE3HhU8Eq0pcOay0J56ZJiRWPhKmaTwMOmbZ nRDMZ2CY2fK2pUufh6Ja0307DNBHFZBl56DRDboTaHRDyxQ0CnLJukYZRg31tAfxirCN wWp7CK2i2KpJtYIWKzxtX2wCpXkjc3ymzRjLgoCPDRU97fhDkEutDe1MG4BuhIKPZo2q LSYw== 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=QJojNdCNRZdeObtsdoaPzzj/IMsZp6P9O1kQugt1wqE=; b=Ptq9d4bb041d38TUKEMcdaRXn0PnfpjiKPfxgCBAkPYKQlAlEYVw6o0/exdRTLmmhu LQ1a5n/xVIcwofSjQ+B0PZNpR2dOEv7cOdylRdKoEVZ+/zk5vtxqWNCoWLo8CGj7655X 7KvY9Sv0b575wGAManJovxo4yUSUQOhkz3pxEvZA+UhROFc6g3VAAuP/WGZAwWaXecvA YOELfq/Wo0M4NPb9geTdNaMRvQdkoQFicJTE2T27sjc20lRuusyjzxuDMMJwHxF5F5xk 8OIsVg5xIYdp1IGC6DfqFP+CmNMRka0aU8hkUj3yC4zpjtvf0VR/motU8/J/TJFRChVR Vhyw== X-Gm-Message-State: AOAM530NC9L6IZHs3UxgmOLcK7tW3/ysn2ARzaTDpAI8us5cSyGkkmg/ VISUFwmr1gZIv1fxaG+JoVeQ/EhTlPdINA== X-Google-Smtp-Source: ABdhPJyWOJJLJx2IeJbv+UMqbCtDpwaYJjnSAw1w2Y1nSyjQpBYZbTvHwYh1lpSqHhwjPVAQnG7nDA== X-Received: by 2002:a05:6e02:12ab:: with SMTP id f11mr17030876ilr.200.1627393243454; Tue, 27 Jul 2021 06:40:43 -0700 (PDT) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id r198sm2342266ior.7.2021.07.27.06.40.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Jul 2021 06:40:42 -0700 (PDT) Subject: Re: [PATCH net-next 0/4] net: ipa: kill IPA_VALIDATION To: Leon Romanovsky Cc: davem@davemloft.net, kuba@kernel.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210726174010.396765-1-elder@linaro.org> <5b97f7b1-f65f-617e-61b4-2fdc5f08bc3e@linaro.org> From: Alex Elder Message-ID: <07765bd2-eade-ee52-fa18-56f2e573461a@linaro.org> Date: Tue, 27 Jul 2021 08:40:42 -0500 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; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/27/21 7:56 AM, Leon Romanovsky wrote: >> In any case I take your point. I will now add to my task list >> a review of these spots. I'd like to be sure an error message >> *is* reported at an appropriate level up the chain of callers so >> I can always identify the culprit in the a WARN_ON() fires (even >> though it should never >> happen). And in each case I'll evaluate >> whether returning is better than not. > You can, but users don't :). So if it is valid but error flow, that > needs user awareness, simply print something to the dmesg with *_err() > prints. For some reason you seem to care about users. I guess the WARN stack trace tells me where it comes from. This would be an invalid error flow, and should never happen. I'll still plan to review each of these again. > BTW, I'm trying to untangle some of the flows in net/core/devlink.c > and such if(WARN()) pattern is even harmful, because it is very hard to > understand when that error is rare/non-exist/real. That's what assert() is for, but we've already had that discussion :) -Alex