Date: Fri, 19 Jan 2024 16:53:34 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 07dd91cb046b - stable/13 - isp(4): Style changes Message-ID: <202401191653.40JGrYtu060155@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=07dd91cb046b9cabafb19e7d1dd38a1df89133ed commit 07dd91cb046b9cabafb19e7d1dd38a1df89133ed Author: Joerg Pulz <Joerg.Pulz@frm2.tum.de> AuthorDate: 2023-07-07 21:43:35 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-01-19 16:51:46 +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 (cherry picked from commit 348ec8dc036bf4ba1f607bb8acb25a0358436cc7) --- 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 241aad838cee..74f90b64441c 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -720,7 +720,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)) @@ -4446,7 +4448,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)", @@ -4504,7 +4506,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; @@ -4521,13 +4523,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; @@ -4541,13 +4543,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; @@ -4578,46 +4580,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; @@ -4631,19 +4633,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 0d089608fb35..322b2db35fef 100644 --- a/sys/dev/isp/ispreg.h +++ b/sys/dev/isp/ispreg.h @@ -261,10 +261,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401191653.40JGrYtu060155>