From nobody Mon Sep 30 04:45:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mr2R60z5XkQH; Mon, 30 Sep 2024 04:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mq5xx5z4FdF; Mon, 30 Sep 2024 04:45:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQ1Ey+XJm+K392QC8iBCEtnlxP5VyxY23bMGgDCvQ8o=; b=fME8ss55PLqVOXQFgaL9FIBE+TWQvW3rv/ygTFxloDGr9XItcLC83PLrwp7ta6Bgh86+3N JzAI+cLL70r4NZTh5fRiTie4J9fFh5amr3k17dAkr5EIIUhwi+yAJYdxG1fasn3rEdvqiU O2tJvGVb40tc9ZUSqQ6nVmCq57NHQi2js220+0Q4uD55VChp0n2rJ0NrqzZlN5iH8+1jLE bX/RwnR49Nxc7Z8f1HqzB3PeXsjAVrk8z0uT7ChZASeylP5cPanHjM3HBAfufKSFeOvYwt P6Gl70q8eJtsd6Zd+GGal0xPmTgtYmyqwN+x4OUFrSIRB9RJ+BdeOOUKmWonLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQ1Ey+XJm+K392QC8iBCEtnlxP5VyxY23bMGgDCvQ8o=; b=Mv4ZpCs9niyF9NA3zXzjXOfLuL9/mfoxhioMnemK4urACH8d/dfajtqOv0CD1Nt5p+ZmNJ J3fL3DpLrjf2LeSKzv7TFCqV46Rz0WeZS9OioJ4W0mLVXm+8fm7fL22TDEVLt1OlZ6k7oc Yrp/hyLs+AdkAKkwC8lTD2MH2qbCw30aYbzOBz7Kl/VijXuEABCdlZ9CKVHIOe086g00RG AS4uanc5lcudX+mREVwgMpPZnn9yrNQ1lGKaV8Pv11JIKjwWgiw8vlJkEENehQ68pzHbyP h+pVzhbMFaFDBTFMw7LEufTfOndld+W79bTzzN+I8ILFD1GAmbc3UHwT8+Jbww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671547; a=rsa-sha256; cv=none; b=wh+GbVGHaLOe/bnae+65bjZ7vC8c+smb2C1H8dq4mFwoG16yTdsOI/EM8GaOySJauUKbtf zkDKwnZO4GNG2M3qcKBpCZCwYAN19Q7vWKDNFmOverEjZVidZRQkc60XHJQOlYWN40EmWO bDzPtj774TN2s9pN4GXgY+ptNZqXJw6M8gr5jeIHKn9n/ehT4vqGbnNhGp8K48dy/WzOZK NSbHIyhEhM+TgnZeB4B29tcqoY75jyVwNy07n1E9algelLi5RhVYuNjdWQyWVBwqiXm5aU tnVznY0Up7YWxZrAaI2ny0ZQIK8okDXTespAhRZ/kDnNw8XwTnZWBEZV9kU5mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7mq4th3zfPl; Mon, 30 Sep 2024 04:45:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48U4jlj6087949; Mon, 30 Sep 2024 04:45:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jlfe087946; Mon, 30 Sep 2024 04:45:47 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:47 GMT Message-Id: <202409300445.48U4jlfe087946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 025c47549419 - stable/14 - pms(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 025c4754941956e24830a9c3c6f5e2466b19a9e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=025c4754941956e24830a9c3c6f5e2466b19a9e1 commit 025c4754941956e24830a9c3c6f5e2466b19a9e1 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:25 +0000 pms(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 4fb8a80a78aa65e0b30bd5a74373512c678841c9) --- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 38 +++------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c index c24d03a178ee..4e697f06a4cf 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c +++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c @@ -318,13 +318,6 @@ int agtiapi_getdevlist( struct agtiapi_softc *pCard, sizeof(void *) ); AGTIAPI_PRINTK("agtiapi_getdevlist: portCount %d\n", pCard->portCount); devList = malloc(memNeeded1, TEMP2, M_WAITOK); - if (devList == NULL) - { - AGTIAPI_PRINTK("agtiapi_getdevlist: failed to allocate memory\n"); - ret_val = IOCTL_CALL_FAIL; - agIOCTLPayload->Status = IOCTL_ERR_STATUS_INTERNAL_ERROR; - return ret_val; - } osti_memset(devList, 0, memNeeded1); pPortalData = &pCard->pPortalData[0]; pDeviceHandleList = (bit8*)devList; @@ -970,13 +963,8 @@ static int agtiapi_attach( device_t devx ) } else { - pmsc->pPortalData = (ag_portal_data_t *) - malloc( sizeof(ag_portal_data_t) * pmsc->portCount, + pmsc->pPortalData = malloc( sizeof(ag_portal_data_t) * pmsc->portCount, M_PMC_MPRT, M_ZERO | M_WAITOK ); - if (pmsc->pPortalData == NULL) - { - AGTIAPI_PRINTK( "agtiapi_attach: Portal memory allocation ERROR\n" ); - } } pPortalData = pmsc->pPortalData; @@ -1227,32 +1215,14 @@ STATIC agBOOLEAN agtiapi_InitCardHW( struct agtiapi_softc *pmsc ) pmsc->flags |= AGTIAPI_SYS_INTR_ON; numVal = sizeof(ag_device_t) * pmsc->devDiscover; - pmsc->pDevList = - (ag_device_t *)malloc( numVal, M_PMC_MDVT, M_ZERO | M_WAITOK ); - if( !pmsc->pDevList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d DevList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW\n" ); - return AGTIAPI_FAIL; - } + pmsc->pDevList = malloc( numVal, M_PMC_MDVT, M_ZERO | M_WAITOK ); #ifdef LINUX_PERBI_SUPPORT numVal = sizeof(ag_slr_map_t) * pmsc->devDiscover; - pmsc->pSLRList = - (ag_slr_map_t *)malloc( numVal, M_PMC_MSLR, M_ZERO | M_WAITOK ); - if( !pmsc->pSLRList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d SLRList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW SLRL\n" ); - return AGTIAPI_FAIL; - } + pmsc->pSLRList = malloc( numVal, M_PMC_MSLR, M_ZERO | M_WAITOK ); numVal = sizeof(ag_tgt_map_t) * pmsc->devDiscover; - pmsc->pWWNList = - (ag_tgt_map_t *)malloc( numVal, M_PMC_MTGT, M_ZERO | M_WAITOK ); - if( !pmsc->pWWNList ) { - AGTIAPI_PRINTK( "agtiapi_InitCardHW: kmalloc %d WWNList ERROR\n", numVal ); - panic( "agtiapi_InitCardHW WWNL\n" ); - return AGTIAPI_FAIL; - } + pmsc->pWWNList = malloc( numVal, M_PMC_MTGT, M_ZERO | M_WAITOK ); // Get the WWN_to_target_ID mappings from the // holding area which contains the input of the