git: 348ec8dc036b - main - isp(4): Style changes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jul 2023 21:48:00 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=348ec8dc036bf4ba1f607bb8acb25a0358436cc7 commit 348ec8dc036bf4ba1f607bb8acb25a0358436cc7 Author: Joerg Pulz <Joerg.Pulz@frm2.tum.de> AuthorDate: 2023-07-07 21:43:35 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-07-07 21:45:30 +0000 isp(4): Style changes Please tools/build/checkstyle9.pl as mentioned by imp@ PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726 --- sys/dev/isp/isp.c | 42 ++++++++++++++++++++++-------------------- sys/dev/isp/ispreg.h | 4 ++-- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 7645da635b7a..a199c4242291 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -721,7 +721,9 @@ isp_init(ispsoftc_t *isp) if (IS_28XX(isp)) icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN_28XX; - isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM - using %d", DEFAULT_FRAMESIZE(isp), icbp->icb_maxfrmlen); + isp_prt(isp, ISP_LOGERR, + "bad frame length (%d) from NVRAM - using %d", + DEFAULT_FRAMESIZE(isp), icbp->icb_maxfrmlen); } if (!IS_26XX(isp)) @@ -4447,7 +4449,7 @@ isp_parse_flthdr_2xxx(ispsoftc_t *isp, uint8_t *flthdr_data) fcp->flt_length = le16toh((uint16_t) (ISP2XXX_FLT_LENGTH(flthdr_data))); csum = le16toh((uint16_t) (ISP2XXX_FLT_CSUM(flthdr_data))); - if ((fcp->flt_length == 0 ) || + if ((fcp->flt_length == 0) || (fcp->flt_length > (FLT_HEADER_SIZE + FLT_REGIONS_SIZE))) { isp_prt(isp, ISP_LOGERR, "FLT[DEF]: Invalid length=0x%x(%d)", @@ -4505,7 +4507,7 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) region[count].code, region[count].start, region[count].end, region[count].size, region[count].attribute); - switch(region[count].code) { + switch (region[count].code) { case FLT_REG_FW: fcp->flt_region_fw = region[count].start; break; @@ -4522,13 +4524,13 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_vpd = region[count].start; break; case FLT_REG_VPD_2: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 2) fcp->flt_region_vpd = region[count].start; break; case FLT_REG_VPD_3: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 3) fcp->flt_region_vpd = region[count].start; @@ -4542,13 +4544,13 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_nvram = region[count].start; break; case FLT_REG_NVRAM_2: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 2) fcp->flt_region_nvram = region[count].start; break; case FLT_REG_NVRAM_3: - if (!IS_27XX(isp)) + if (!IS_27XX(isp)) break; if (isp->isp_port == 3) fcp->flt_region_nvram = region[count].start; @@ -4579,46 +4581,46 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) fcp->flt_region_fcp_prio = region[count].start; break; case FLT_REG_IMG_PRI_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_img_status_pri = region[count].start; break; case FLT_REG_IMG_SEC_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_img_status_sec = region[count].start; break; case FLT_REG_FW_SEC_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_fw_sec = region[count].start; break; case FLT_REG_BOOTLOAD_SEC_27XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_boot_sec = region[count].start; break; case FLT_REG_AUX_IMG_PRI_28XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_aux_img_status_pri = region[count].start; break; case FLT_REG_AUX_IMG_SEC_28XX: - if (IS_27XX(isp)) + if (IS_27XX(isp)) fcp->flt_region_aux_img_status_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_0: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 0) fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_1: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 1) fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_2: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 2) fcp->flt_region_nvram_sec = region[count].start; break; case FLT_REG_NVRAM_SEC_28XX_3: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 3) fcp->flt_region_nvram_sec = region[count].start; break; @@ -4632,19 +4634,19 @@ isp_parse_flt_2xxx(ispsoftc_t *isp, uint8_t *flt_data) break; case FLT_REG_VPD_SEC_27XX_1: case FLT_REG_VPD_SEC_28XX_1: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 1) fcp->flt_region_vpd_sec = region[count].start; break; case FLT_REG_VPD_SEC_27XX_2: case FLT_REG_VPD_SEC_28XX_2: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 2) fcp->flt_region_vpd_sec = region[count].start; break; case FLT_REG_VPD_SEC_27XX_3: case FLT_REG_VPD_SEC_28XX_3: - if (IS_27XX(isp)) + if (IS_27XX(isp)) if (isp->isp_port == 3) fcp->flt_region_vpd_sec = region[count].start; break; diff --git a/sys/dev/isp/ispreg.h b/sys/dev/isp/ispreg.h index eae841ce2b35..78af1a4476cb 100644 --- a/sys/dev/isp/ispreg.h +++ b/sys/dev/isp/ispreg.h @@ -262,10 +262,10 @@ typedef struct { #define ISP25XX_FLT_ADDR 0x50400 #define ISP27XX_BASE_ADDR 0x7f800000 -#define ISP27XX_FLT_ADDR (0x3F1000/4) +#define ISP27XX_FLT_ADDR (0x3F1000 / 4) #define ISP28XX_BASE_ADDR 0x7f7d0000 -#define ISP28XX_FLT_ADDR (0x11000/4) +#define ISP28XX_FLT_ADDR (0x11000 / 4) #define FLT_HEADER_SIZE 8 #define FLT_REGION_SIZE 16