git: ccaec73d0b49 - main - ada: Eliminate dead code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 25 Apr 2022 18:54:55 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ccaec73d0b490a95e97f1adb973de70f7421d52c commit ccaec73d0b490a95e97f1adb973de70f7421d52c Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-04-25 18:54:37 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-25 18:55:04 +0000 ada: Eliminate dead code We never use the cgd that we get from the XPT_GDEV_TYPE call. Prior to 9a6844d55fe33 we used it to determine if READ AHEAD or WRITE CACHING was supported. However, all that information was moved into adasetflags so we no longer need to this since it's cached in the softc and updated with the IDENTIFY data changes automatically. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D35039 --- sys/cam/ata/ata_da.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index efca987b39b4..a83c5a50c5f3 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1377,10 +1377,6 @@ adaasync(void *callback_arg, u_int32_t code, cam_periph_async(periph, code, path, arg); if (softc->state != ADA_STATE_NORMAL) break; - memset(&cgd, 0, sizeof(cgd)); - xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cgd.ccb_h.func_code = XPT_GDEV_TYPE; - xpt_action((union ccb *)&cgd); if (ADA_RA >= 0 && softc->flags & ADA_FLAG_CAN_RAHEAD) softc->state = ADA_STATE_RAHEAD; else if (ADA_WC >= 0 && softc->flags & ADA_FLAG_CAN_WCACHE)