From owner-svn-src-all@freebsd.org Tue Sep 15 05:51:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64F293F178E; Tue, 15 Sep 2020 05:51:04 +0000 (UTC) (envelope-from avg@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BrC5N1r48z4rqB; Tue, 15 Sep 2020 05:51:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 225902383E; Tue, 15 Sep 2020 05:51:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08F5p4m6054395; Tue, 15 Sep 2020 05:51:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08F5p3xI054394; Tue, 15 Sep 2020 05:51:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202009150551.08F5p3xI054394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 15 Sep 2020 05:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365742 - stable/12/sys/cam/mmc X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/cam/mmc X-SVN-Commit-Revision: 365742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2020 05:51:04 -0000 Author: avg Date: Tue Sep 15 05:51:03 2020 New Revision: 365742 URL: https://svnweb.freebsd.org/changeset/base/365742 Log: MFC r365447: mmc_da: universally use uint8_t for the partition index Modified: stable/12/sys/cam/mmc/mmc_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/mmc/mmc_da.c ============================================================================== --- stable/12/sys/cam/mmc/mmc_da.c Tue Sep 15 05:48:55 2020 (r365741) +++ stable/12/sys/cam/mmc/mmc_da.c Tue Sep 15 05:51:03 2020 (r365742) @@ -170,7 +170,6 @@ static void sdda_start_init(void *context, union ccb * static void sdda_start_init_task(void *context, int pending); static void sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *start_ccb); static uint32_t sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb); -static void sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part); static int mmc_select_card(struct cam_periph *periph, union ccb *ccb, uint32_t rca); static inline uint32_t mmc_get_sector_size(struct cam_periph *periph) {return MMC_SECTOR_SIZE;} @@ -1658,10 +1657,13 @@ sdda_process_mmc_partitions(struct cam_periph *periph, * This function cannot fail, instead check switch errors in sddadone(). */ static void -sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part) { +sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, + uint8_t part) +{ struct sdda_softc *sc = (struct sdda_softc *)periph->softc; uint8_t value; + KASSERT(part < MMC_PART_MAX, ("%s: invalid partition index", __func__)); sc->part_requested = part; value = (sc->raw_ext_csd[EXT_CSD_PART_CONFIG] & @@ -1685,7 +1687,7 @@ sddastart(struct cam_periph *periph, union ccb *start_ struct sdda_softc *softc = (struct sdda_softc *)periph->softc; struct sdda_part *part; struct mmc_params *mmcp = &periph->path->device->mmc_ident_data; - int part_index; + uint8_t part_index; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddastart\n"));