From patchwork Thu Feb 22 18:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 20813 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp110252dyb; Thu, 22 Feb 2024 10:01:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWepUUNb2irvLN4WUpsPtk6R/iY9bG1rAZ1GPJvYrnjQbuuFC38Brbz2Aj4ML1hzY//Sq7uSh3r+VhEaS0eImu1umjQjg== X-Google-Smtp-Source: AGHT+IFIGozqwtIq58qgYELVs3W9kS3k1WN6BovK2KvdztK6gIRRE/YJsZ1/1jM8TN67eUHRslov X-Received: by 2002:a05:6402:646:b0:560:1652:e7cb with SMTP id u6-20020a056402064600b005601652e7cbmr15757440edx.16.1708624904507; Thu, 22 Feb 2024 10:01:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708624904; cv=pass; d=google.com; s=arc-20160816; b=PealbG9pXd2gkaKkpFQos0QO12Ig2rfHhDtgBy2Ib2ONyD+Mjg2ZYOsLMh+memKa7m 54BtWzrGMn8sSaHbVtYmIuduQDAoea6crOPGAq7mqlV8iF4nnL8zQ0LSyqqGV5BGkOUw KDu6tMfvRtQpYPqItplOOeIIwMBihjzjhYClSLPVW+HB72b8PRpRYbhIAwYTkCRp4GjK rcNLU1KXfCFUo7NSI2tgtY0L994C/bGrej9gMjIEhHobeypjWbBn5qMLLsSjJ9inPngk x9+wCWTYCMPvZ1h3QlqZz1eWdJQV02MX0nv7WZhTSyvqIYV+b1nqRIDTn8eGx58Uu+AL 0OUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=We0QmKl+6/c5p1Jenyrniaqj62mY7VXHfWDmerH2Nl8=; fh=VV90pw4GjPSUQwq2AmAS1aZ5bQMz7jUETijgFz5UlTU=; b=08H3pKk1lmfIzYNXDgiOImwrL5FTj1+QYVkftBZ+Ra9JK8DWEiO+PobLYtQs4pJ0LB M3RkE7qz1X1mrmQzJ88r7CPmlG3ncTBR16O0HHWIwDcwRe/GrAsMTg7jj/02xnbayAgB 4ak6P2rhvnuwvfFfRPYIEy2dJjTAHFErkd6bJMBN10a2WhbDZGVJWOC+ZrU/fTQt9w50 Ps72dc6bIGqjkOejxrxOO2EXVIji9lNziNSZpUEuD9RyWlY0XmA6NVlIcA2mtI4UWcXR DCmPVfwmzJmQTFG4Ic4Rbvk8g+nuWfX+aZXxrM7SGqhIDDYcQ+AyFD07dQtHm9IEVUdd eKuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gxhfx8UR; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-77030-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77030-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c25-20020a056402121900b00564647b7e30si4325529edw.318.2024.02.22.10.01.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 10:01:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77030-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gxhfx8UR; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-77030-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77030-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8D9C81F217BC for ; Thu, 22 Feb 2024 18:01:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04D8A1586D2; Thu, 22 Feb 2024 18:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gxhfx8UR" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7B43153BEF for ; Thu, 22 Feb 2024 18:01:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708624869; cv=none; b=W0VlbLqGPYOscxoSlWhkDLgcRVJuwweJGSLh/jrJb8hBbYrSCmpumXhxbE80VEXeh+Infn++LlkVLs6dlfxYgXX7u8+ne8+xpGv76KOowPNeaO6SnGWKpSpmhGktMW1ZBaVNOmi9J8/uD0wnJvVD7NjldozG8p7qTFNnQFWBarI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708624869; c=relaxed/simple; bh=YKlPBD8r4IRcXRM3XhHQwr5xkXxCVZJ/7qUyz+oSKEg=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KYGtKqQ3qVtmura6fIkbIXA0HD6AP5QTR66VkWK1uN/ioMCfs3jGYUfG9tSSXczRqFKNNdQK7buB4I5daOQf5G89yYTox6rfY1EAq1iSdT+WAGVNsuJf4mt9kIaAeaWwb6HiAKPocPYl3GoK6ilG8tPpzdfZkbukU44rINhLG5w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=gxhfx8UR; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41M7hxNb023334; Thu, 22 Feb 2024 18:00:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=We0QmKl +6/c5p1Jenyrniaqj62mY7VXHfWDmerH2Nl8=; b=gxhfx8URy65A6qZ2uK+uqy5 hoYfnBrSLue91Z58LZT7Aj+KYEvMwanZdFIdixjMl8LWE10bl4OfdwM0Om5GLTZs ItSyMF4b5Fto/qM1gxa0gmn8ALAIcyQBIBPwRZQQPg0fddyW4sA1icGNgA9d31tl 7YqcXfEMvesnVVbBXLMLgJmv3u472zfsuwHi23yv6XC/4ZcImTbD0V4i7hejfVo5 a58BNhISbCMKz1KybGJkDwFm742+o8v3Wk6MSBZz9fvF9tiSCFoHUNM3cxobTF0K rwc4Qdn8vU5LLiourXcexbHqqM6IwiNA+L3Q5w4nGCT5V9xkSWvIk/q5io91vKQ= = Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3we24ahtbk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 18:00:54 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41MI0sMM010160 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 18:00:54 GMT Received: from hu-mojha-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 22 Feb 2024 10:00:51 -0800 From: Mukesh Ojha To: , , , CC: , Mukesh Ojha Subject: [PATCH vRFC 0/8] Refactor and rename request firmware API Date: Thu, 22 Feb 2024 23:30:25 +0530 Message-ID: <20240222180033.23775-1-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.43.0.254.ga26002b62827 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: c3yGpIzzzGuK1En9-nVIO1hJe56HYlng X-Proofpoint-ORIG-GUID: c3yGpIzzzGuK1En9-nVIO1hJe56HYlng X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_13,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 mlxscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402220140 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791623067679418379 X-GMAIL-MSGID: 1791623067679418379 This came as an idea, when i was looking for nowarn version of request_firmware_into_buf() but ended up doing this. I am keeping this as RFC, as i am not sure whether we are open for such changes in API or some refactors. Please provide feedback. Mukesh Ojha (8): firmware_loader: Refactor request firmware lower level functions treewide: rename firmware_request_nowarn() treewide: rename firmware_request_platform() treewide: rename firmware_request_cache() firmware: Convert minor inline function to macro firmware: Move module template to the bottom firmware: remove prototype of fw_cache_piggyback_on_request() firmware: FW_OPT_UEVENT for all request_firmware family functions .../firmware/fallback-mechanisms.rst | 4 +- .../driver-api/firmware/lookup-order.rst | 2 +- .../driver-api/firmware/request_firmware.rst | 14 +- drivers/accel/ivpu/ivpu_fw.c | 2 +- drivers/base/firmware_loader/main.c | 226 ++++++++---------- drivers/bluetooth/btbcm.c | 2 +- drivers/bluetooth/btintel.c | 4 +- drivers/bluetooth/hci_bcm4377.c | 4 +- drivers/crypto/ccp/sev-dev.c | 6 +- drivers/crypto/inside-secure/safexcel.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 2 +- drivers/input/touchscreen/chipone_icn8505.c | 2 +- drivers/input/touchscreen/silead.c | 4 +- drivers/media/tuners/si2157.c | 2 +- drivers/memory/brcmstb_dpfe.c | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/wireless/ath/ath10k/core.c | 2 +- drivers/net/wireless/ath/ath10k/testmode.c | 2 +- drivers/net/wireless/ath/ath11k/core.c | 2 +- drivers/net/wireless/ath/ath12k/core.c | 2 +- .../broadcom/brcm80211/brcmfmac/firmware.c | 2 +- drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 2 +- .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 2 +- .../net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- .../wireless/mediatek/mt76/mt76x0/usb_mcu.c | 2 +- drivers/net/wireless/mediatek/mt7601u/mcu.c | 2 +- drivers/net/wireless/realtek/rtw89/fw.c | 2 +- drivers/net/wireless/silabs/wfx/fwio.c | 2 +- drivers/usb/host/xhci-pci-renesas.c | 2 +- include/linux/firmware.h | 10 +- lib/test_firmware.c | 2 +- sound/pci/hda/cs35l41_hda.c | 2 +- sound/pci/hda/cs35l56_hda.c | 2 +- sound/soc/codecs/wm_adsp.c | 2 +- sound/soc/sof/fw-file-profile.c | 4 +- 36 files changed, 152 insertions(+), 180 deletions(-)