You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(18) |
Dec
(34) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(14) |
Feb
(14) |
Mar
(3) |
Apr
(10) |
May
(10) |
Jun
(17) |
Jul
(15) |
Aug
(24) |
Sep
(24) |
Oct
(11) |
Nov
(13) |
Dec
(15) |
| 2008 |
Jan
(10) |
Feb
(46) |
Mar
(20) |
Apr
(42) |
May
(44) |
Jun
(22) |
Jul
(59) |
Aug
(8) |
Sep
(15) |
Oct
(52) |
Nov
(30) |
Dec
(38) |
| 2009 |
Jan
(27) |
Feb
(27) |
Mar
(47) |
Apr
(85) |
May
(74) |
Jun
(41) |
Jul
(70) |
Aug
(64) |
Sep
(97) |
Oct
(147) |
Nov
(67) |
Dec
(48) |
| 2010 |
Jan
(68) |
Feb
(33) |
Mar
(53) |
Apr
(98) |
May
(55) |
Jun
(71) |
Jul
(99) |
Aug
(132) |
Sep
(291) |
Oct
(220) |
Nov
(344) |
Dec
(300) |
| 2011 |
Jan
(57) |
Feb
(25) |
Mar
(59) |
Apr
(104) |
May
(60) |
Jun
(155) |
Jul
(143) |
Aug
(43) |
Sep
(53) |
Oct
(20) |
Nov
(35) |
Dec
(103) |
| 2012 |
Jan
(62) |
Feb
(43) |
Mar
(29) |
Apr
(80) |
May
(75) |
Jun
(61) |
Jul
(52) |
Aug
(58) |
Sep
(33) |
Oct
(32) |
Nov
(69) |
Dec
(37) |
| 2013 |
Jan
(77) |
Feb
(28) |
Mar
(52) |
Apr
(18) |
May
(37) |
Jun
(21) |
Jul
(22) |
Aug
(55) |
Sep
(29) |
Oct
(74) |
Nov
(50) |
Dec
(44) |
| 2014 |
Jan
(77) |
Feb
(62) |
Mar
(81) |
Apr
(99) |
May
(59) |
Jun
(95) |
Jul
(55) |
Aug
(34) |
Sep
(78) |
Oct
(33) |
Nov
(48) |
Dec
(51) |
| 2015 |
Jan
(56) |
Feb
(120) |
Mar
(37) |
Apr
(15) |
May
(22) |
Jun
(196) |
Jul
(54) |
Aug
(33) |
Sep
(32) |
Oct
(42) |
Nov
(149) |
Dec
(61) |
| 2016 |
Jan
(15) |
Feb
(26) |
Mar
(37) |
Apr
(27) |
May
(14) |
Jun
(11) |
Jul
(13) |
Aug
(64) |
Sep
(2) |
Oct
(36) |
Nov
(18) |
Dec
(46) |
| 2017 |
Jan
(6) |
Feb
(1) |
Mar
(2) |
Apr
(50) |
May
(42) |
Jun
(11) |
Jul
(4) |
Aug
(12) |
Sep
(11) |
Oct
(21) |
Nov
(15) |
Dec
(42) |
| 2018 |
Jan
(33) |
Feb
(27) |
Mar
(20) |
Apr
(5) |
May
(4) |
Jun
(1) |
Jul
(42) |
Aug
(29) |
Sep
(11) |
Oct
(40) |
Nov
(312) |
Dec
(18) |
| 2019 |
Jan
(44) |
Feb
(98) |
Mar
(125) |
Apr
(160) |
May
(123) |
Jun
(33) |
Jul
(56) |
Aug
(81) |
Sep
(24) |
Oct
(23) |
Nov
(52) |
Dec
(86) |
| 2020 |
Jan
(6) |
Feb
(17) |
Mar
(62) |
Apr
(21) |
May
(118) |
Jun
(42) |
Jul
(52) |
Aug
(62) |
Sep
(20) |
Oct
(5) |
Nov
(23) |
Dec
(111) |
| 2021 |
Jan
(31) |
Feb
(8) |
Mar
(26) |
Apr
(13) |
May
(54) |
Jun
(31) |
Jul
(17) |
Aug
(10) |
Sep
(83) |
Oct
(8) |
Nov
(21) |
Dec
(33) |
| 2022 |
Jan
(67) |
Feb
(11) |
Mar
(4) |
Apr
(46) |
May
(12) |
Jun
(17) |
Jul
(19) |
Aug
(7) |
Sep
(53) |
Oct
(14) |
Nov
(29) |
Dec
(22) |
| 2023 |
Jan
(20) |
Feb
(4) |
Mar
(37) |
Apr
(25) |
May
(15) |
Jun
(20) |
Jul
(38) |
Aug
(1) |
Sep
(1) |
Oct
(34) |
Nov
|
Dec
(8) |
| 2024 |
Jan
(15) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(23) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
(18) |
Oct
(1) |
Nov
(18) |
Dec
(15) |
| 2025 |
Jan
(5) |
Feb
(1) |
Mar
(7) |
Apr
(4) |
May
(18) |
Jun
(7) |
Jul
|
Aug
(17) |
Sep
(13) |
Oct
(15) |
Nov
(5) |
Dec
|
|
From: Gleb C. <lna...@ya...> - 2025-11-19 08:39:03
|
Commit: 7d0b1d2 GitHub URL: https://github.com/SCST-project/scst/commit/7d0b1d2588f98625b20b0cd508df188327531470 Author: Gleb Chesnokov Date: 2025-11-19T11:38:42+03:00 Log Message: ----------- scst: Unbreak the RHEL 9.7 build Fixes: https://github.com/SCST-project/scst/issues/317 Modified Paths: -------------- .github/workflows/run_regression_tests.yaml | 1 + nightly/conf/nightly.conf | 1 + qla2x00t-32gbit/qla_nvme.c | 10 ++++++++-- qla2x00t-32gbit/qla_os.c | 12 +++++++++--- scst/src/scst_lib.c | 5 ++++- 5 files changed, 23 insertions(+), 6 deletions(-) =================================================================== diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index 5e3fd93..c51b808 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -38,6 +38,7 @@ jobs: '3.18.140', '3.10.108', '6.12.0-55.34.1.el10_0^AlmaLinux^10.0', + '5.14.0-611.5.1.el9_7^AlmaLinux^9.7', '5.14.0-570.46.1.el9_6^AlmaLinux^9.6', '5.14.0-503.40.1.el9_5^AlmaLinux^9.5', '5.14.0-427.42.1.el9_4^AlmaLinux^9.4', diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index 37791e5..ff7afa5 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -73,6 +73,7 @@ ABT_KERNELS=" \ 3.11.10-nc \ 3.10.108-nc \ 6.12.0-55.34.1.el10_0^AlmaLinux^10.0-nc \ +5.14.0-611.5.1.el9_7^AlmaLinux^9.7-nc \ 5.14.0-570.46.1.el9_6^AlmaLinux^9.6-nc \ 5.14.0-503.40.1.el9_5^AlmaLinux^9.5-nc \ 5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \ diff --git a/qla2x00t-32gbit/qla_nvme.c b/qla2x00t-32gbit/qla_nvme.c index 2e67893..96dba6a 100644 --- a/qla2x00t-32gbit/qla_nvme.c +++ b/qla2x00t-32gbit/qla_nvme.c @@ -13,7 +13,10 @@ #include <linux/delay.h> #include <linux/nvme.h> #include <linux/nvme-fc.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \ + RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0)) #include <linux/blk-mq-pci.h> #endif #include <linux/blk-mq.h> @@ -869,7 +872,10 @@ static void qla_nvme_map_queues(struct nvme_fc_local_port *lport, { struct scsi_qla_host *vha = lport->private; -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \ + RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0)) blk_mq_pci_map_queues(map, vha->hw->pdev, vha->irq_offset); #else blk_mq_map_hw_queues(map, &vha->hw->pdev->dev, vha->irq_offset); diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 581e324..ee87d03 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -14,8 +14,11 @@ #include <linux/slab.h> #include <linux/workqueue.h> #include <linux/version.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \ - LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \ + RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0)) #include <linux/blk-mq-pci.h> #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) @@ -8186,7 +8189,10 @@ static MAP_QUEUES_RET qla2xxx_map_queues(struct Scsi_Host *shost) if (USER_CTRL_IRQ(vha->hw) || !vha->hw->mqiobase) blk_mq_map_queues(qmap); else -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \ + RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0)) blk_mq_pci_map_queues(qmap, vha->hw->pdev, vha->irq_offset); #else blk_mq_map_hw_queues(qmap, &vha->hw->pdev->dev, diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index d3fdd2d..a78b7a9 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8564,7 +8564,10 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, TRACE_DBG("len %zd, bytes %zd, offset %zd", len, bytes, offset); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \ + RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0)) rc = bio_add_pc_page(q, bio, page, bytes, offset); #else rc = bio_add_page(bio, page, bytes, offset); |
|
From: Gleb C. <lna...@ya...> - 2025-11-19 07:09:40
|
Commit: 2318cee GitHub URL: https://github.com/SCST-project/scst/commit/2318ceed0775acbdc924d28ad2638131b7c56f7a Author: MajorP93 Date: 2025-11-19T10:08:16+03:00 Log Message: ----------- debian, scst-dkms: Move the .install file creation to the correct location in install target * This fixes an issue where the resulting scst-dkms deb package was empty and could not be installed. * By moving the .install file creation to the install target we ensure: - The .install file is generated after the version is set - Paths match the actual DKMS source location - File contents aren't overwritten by later operations Modified Paths: -------------- debian/rules | 16 +++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) =================================================================== diff --git a/debian/rules b/debian/rules index 8424310..a4c4017 100755 --- a/debian/rules +++ b/debian/rules @@ -42,14 +42,7 @@ build: export BUILD_2X_MODULE=y && \ export CONFIG_SCSI_QLA_FC=y && \ export CONFIG_SCSI_QLA2XXX_TARGET=y && \ - for d in $(SUBDIRS); do $(MAKE) -C $$d; done && \ - { \ - echo dkms.conf && \ - echo Makefile && \ - for d in fcst iscsi-scst $(QLA_INI_DIR) scst scst_local srpt; do\ - echo $$d; \ - done; \ - } | sed "s,^,usr/src/scst-$(VERSION)/," >debian/scst-dkms.install + for d in $(SUBDIRS); do $(MAKE) -C $$d; done build-indep: build @@ -74,6 +67,13 @@ install: make $(PKG_BUILD_MODE) && \ rm -f "$(DESTDIR)"/lib/modules/*/[Mm]odule* && \ mkdir -p $(DESTDIR)/usr/src/scst-$(VERSION) && \ + { \ + echo dkms.conf && \ + echo Makefile && \ + for d in fcst iscsi-scst $(QLA_INI_DIR) scst scst_local srpt; do\ + echo $$d; \ + done; \ + } | sed "s,^,usr/src/scst-$(VERSION)/," >debian/scst-dkms.install &&\ for f in scst.dkms scst-dkms.postinst scst-dkms.prerm; do \ sed "s/\$${PACKAGE_VERSION}/$(VERSION)/; \ s/\$${PKG_BUILD_MODE}/$(PKG_BUILD_MODE)/" \ |
|
From: Gleb C. <lna...@ya...> - 2025-11-19 07:05:50
|
Commit: 9590762 GitHub URL: https://github.com/SCST-project/scst/commit/9590762792d16e08e665fd5cb4cfabeb5b7a893d Author: MajorP93 Date: 2025-11-19T10:05:19+03:00 Log Message: ----------- debian, scst-dkms: Move the .install file creation to the correct location in install target * This fixes an issue where the resulting scst-dkms deb package was empty and could not be installed. * By moving the .install file creation to the install target we ensure: - The .install file is generated after the version is set - Paths match the actual DKMS source location - File contents aren't overwritten by later operations Modified Paths: -------------- debian/rules | 16 +++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) =================================================================== diff --git a/debian/rules b/debian/rules index 945592b..caf1640 100755 --- a/debian/rules +++ b/debian/rules @@ -42,14 +42,7 @@ build: export BUILD_2X_MODULE=y && \ export CONFIG_SCSI_QLA_FC=y && \ export CONFIG_SCSI_QLA2XXX_TARGET=y && \ - for d in $(SUBDIRS); do $(MAKE) -C $$d; done && \ - { \ - echo dkms.conf && \ - echo Makefile && \ - for d in fcst iscsi-scst $(QLA_INI_DIR) scst scst_local srpt; do\ - echo $$d; \ - done; \ - } | sed "s,^,usr/src/scst-$(VERSION)/," >debian/scst-dkms.install + for d in $(SUBDIRS); do $(MAKE) -C $$d; done build-indep: build @@ -74,6 +67,13 @@ install: make $(PKG_BUILD_MODE) && \ rm -f "$(DESTDIR)"/lib/modules/*/[Mm]odule* && \ mkdir -p $(DESTDIR)/usr/src/scst-$(VERSION) && \ + { \ + echo dkms.conf && \ + echo Makefile && \ + for d in fcst iscsi-scst $(QLA_INI_DIR) scst scst_local srpt; do\ + echo $$d; \ + done; \ + } | sed "s,^,usr/src/scst-$(VERSION)/," >debian/scst-dkms.install &&\ for f in scst.dkms scst-dkms.postinst scst-dkms.prerm; do \ sed "s/\$${PACKAGE_VERSION}/$(VERSION)/; \ s/\$${PKG_BUILD_MODE}/$(PKG_BUILD_MODE)/" \ |
|
From: Gleb C. <lna...@ya...> - 2025-11-05 08:42:23
|
Commit: 2df209e GitHub URL: https://github.com/SCST-project/scst/commit/2df209ea5f832cc665bdff1652a754c86e3d96a9 Author: Gleb Chesnokov Date: 2025-11-05T11:41:41+03:00 Log Message: ----------- scstadmin: Fix precedence typo in error propagation Fix Perl precedence warnings: Possible precedence problem between ! and numeric gt (>) at SCST.pm line 980. Possible precedence problem between ! and numeric gt (>) at SCST.pm line 1223. Possible precedence problem between ! and numeric gt (>) at SCST.pm line 3847. Modified Paths: -------------- scstadmin/scstadmin.sysfs/scst-1.0.0/lib/SCST/SCST.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) =================================================================== diff --git a/scstadmin/scstadmin.sysfs/scst-1.0.0/lib/SCST/SCST.pm b/scstadmin/scstadmin.sysfs/scst-1.0.0/lib/SCST/SCST.pm index 0f5f9c8..af4738d 100644 --- a/scstadmin/scstadmin.sysfs/scst-1.0.0/lib/SCST/SCST.pm +++ b/scstadmin/scstadmin.sysfs/scst-1.0.0/lib/SCST/SCST.pm @@ -977,7 +977,7 @@ sub checkDriverDynamicAttributes { if (!defined($available)) { my $rc = $self->driverExists($driver); return SCST_C_DRV_NO_DRIVER if (!$rc); - return $rc if (!$rc > 1); + return $rc if ($rc > 1); return SCST_C_FATAL_ERROR; } @@ -1220,7 +1220,7 @@ sub checkTargetDynamicAttributes { if (!defined($available)) { my $rc = $self->driverExists($driver); return SCST_C_DRV_NO_DRIVER if (!$rc); - return $rc if (!$rc > 1); + return $rc if ($rc > 1); return SCST_C_FATAL_ERROR; } @@ -3844,7 +3844,7 @@ sub checkDeviceCreateAttributes { if (!defined($available)) { my $rc = $self->handlerExists($handler); return SCST_C_HND_NO_HANDLER if (!$rc); - return $rc if (!$rc > 1); + return $rc if ($rc > 1); return SCST_C_FATAL_ERROR; } |
|
From: Gleb C. <lna...@ya...> - 2025-11-05 08:42:11
|
Commit: 492b6cc GitHub URL: https://github.com/SCST-project/scst/commit/492b6ccbea14a67a96cac897fd3aed2426f50db0 Author: Gleb Chesnokov Date: 2025-11-05T11:41:41+03:00 Log Message: ----------- scstadmin.spec: Install unit into %{_unitdir} and package it Fixes: https://github.com/SCST-project/scst/issues/323 Modified Paths: -------------- scstadmin/Makefile | 5 +++-- scstadmin/scstadmin.spec.in | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) =================================================================== diff --git a/scstadmin/Makefile b/scstadmin/Makefile index a839f16..37cdd18 100644 --- a/scstadmin/Makefile +++ b/scstadmin/Makefile @@ -33,6 +33,7 @@ INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ else \ echo /etc/init.d; \ fi) +SYSTEMD_UNITDIR ?= /lib/systemd/system ECHO_INSTALL_FN = \ if [ -n "$(DESTDIR)" ]; then \ @@ -112,9 +113,9 @@ install install_vendor: fi # Install systemd service file if [ -d systemd ]; then \ - install -d $(DESTDIR)/lib/systemd/system; \ + install -d $(DESTDIR)$(SYSTEMD_UNITDIR); \ install -m 644 systemd/scst.service \ - $(DESTDIR)/lib/systemd/system/scst.service; \ + $(DESTDIR)$(SYSTEMD_UNITDIR)/scst.service; \ fi for s in iscsi-scst qla2x00t; do \ { $(call REMOVE_FN,$$s); } >/dev/null 2>&1; \ diff --git a/scstadmin/scstadmin.spec.in b/scstadmin/scstadmin.spec.in index 0d32e69..68793e4 100644 --- a/scstadmin/scstadmin.spec.in +++ b/scstadmin/scstadmin.spec.in @@ -17,6 +17,8 @@ Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReqProv: yes Requires: psmisc, coreutils +BuildRequires: systemd-rpm-macros +%{?systemd_requires} %description A tool for configuring SCST via the SCST sysfs interface. Allows to save, @@ -56,7 +58,7 @@ export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} %{make} %install -export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} SBINDIR=%{_sbindir} +export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} SBINDIR=%{_sbindir} SYSTEMD_UNITDIR=%{_unitdir} %{make} install_vendor %scstadmin_perl_process_packlist rm -rf %{buildroot}/var/adm/perl-modules/scst @@ -71,10 +73,20 @@ rm -f /usr/local/man/man3/SCST::SCST.3pm* rm -f /usr/local/man/man5/scst.5* rm -f /usr/local/man/man5/scst.conf.5* +%post +%systemd_post scst.service + +%preun +%systemd_preun scst.service + +%postun +%systemd_postun scst.service + %files %defattr(-,root,root,0755) %config(noreplace) /etc/default/scst /etc/init.d/scst +%{_unitdir}/scst.service %{_sbindir}/scstadmin %{perl_vendorlib}/SCST %{perl_vendorarch}/auto/SCST_SCST |
|
From: Gleb C. <lna...@ya...> - 2025-10-30 08:02:39
|
Commit: 6c73cc8 GitHub URL: https://github.com/SCST-project/scst/commit/6c73cc8d2ffb412c0c4173c39a2064510b1c9f24 Author: Ameer Hamza Date: 2025-10-30T11:02:08+03:00 Log Message: ----------- scst_lib: Port to Linux kernel v6.18 Support for the following block layer and memory management changes in the Linux kernel v6.18: - d86eaa0f3c56 ("block: remove the bi_inline_vecs variable sized array from struct bio") - 84efbefa26df ("mm: remove nth_page()") Modified Paths: -------------- scst/src/scst_lib.c | 17 ++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) =================================================================== diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6b48030..d3fdd2d 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8369,12 +8369,19 @@ scst_alloc_bio(unsigned short nr_vecs, gfp_t gfp_mask) /* * See also commit 066ff571011d ("block: turn bio_kmalloc into a * simple kmalloc wrapper"). + * See also commit d86eaa0f3c56 ("block: remove the bi_inline_vecs + * variable sized array from struct bio") # v6.18. */ struct bio *bio; bio = bio_kmalloc(nr_vecs, gfp_mask); - if (bio) + if (bio) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 18, 0) bio_init(bio, NULL, bio->bi_inline_vecs, nr_vecs, 0); +#else + bio_init(bio, NULL, bio_inline_vecs(bio), nr_vecs, 0); +#endif + } return bio; #endif @@ -8575,7 +8582,15 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, need_new_bio = false; offset = 0; len -= bytes; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 18, 0) page = nth_page(page, 1); +#else + /* + * See also commit 84efbefa26df ("mm: remove nth_page()") # v6.18. + * Use simple pointer arithmetic for contiguous pages. + */ + page = page + 1; +#endif } } } |
|
From: Gleb C. <lna...@ya...> - 2025-10-28 15:15:27
|
Commit: 0d3c901 GitHub URL: https://github.com/SCST-project/scst/commit/0d3c9018af8aea2b948d8ae1c6469cf909f05e49 Author: Brian M Date: 2025-10-28T18:15:04+03:00 Log Message: ----------- debian, scstadmin: Add systemd scst.service Add systemd service file when packaging for Debian. Current systemd will automatically generate one, but this functionality will be removed in a future version of systemd. Modified Paths: -------------- debian/rules | 1 + debian/scstadmin.install | 1 + scstadmin/Makefile | 6 +++++ scstadmin/systemd/scst.service | 20 +++++++++++++++ 4 files changed, 28 insertions(+) =================================================================== diff --git a/debian/rules b/debian/rules index 8424310..945592b 100755 --- a/debian/rules +++ b/debian/rules @@ -90,6 +90,7 @@ install: mv "$(DESTDIR)"/usr/man "$(DESTDIR)"/usr/share/man && \ dh_install && \ dh_installman && \ + dh_installsystemd --name=scst --no-start && \ dh_installchangelogs && \ dh_compress && \ dh_fixperms && \ diff --git a/debian/scstadmin.install b/debian/scstadmin.install index 00d0fe1..68a385c 100644 --- a/debian/scstadmin.install +++ b/debian/scstadmin.install @@ -1,4 +1,5 @@ etc/init.d/scst +lib/systemd/system/scst.service usr/sbin/scstadmin usr/share/perl/ usr/lib/ diff --git a/scstadmin/Makefile b/scstadmin/Makefile index ae3c4ec..a839f16 100644 --- a/scstadmin/Makefile +++ b/scstadmin/Makefile @@ -110,6 +110,12 @@ install install_vendor: mkdir -p $(DESTDIR)$(DEFAULTDIR); \ install -m 755 default/scst $(DESTDIR)$(DEFAULTDIR); \ fi + # Install systemd service file + if [ -d systemd ]; then \ + install -d $(DESTDIR)/lib/systemd/system; \ + install -m 644 systemd/scst.service \ + $(DESTDIR)/lib/systemd/system/scst.service; \ + fi for s in iscsi-scst qla2x00t; do \ { $(call REMOVE_FN,$$s); } >/dev/null 2>&1; \ done diff --git a/scstadmin/systemd/scst.service b/scstadmin/systemd/scst.service new file mode 100644 index 0000000..bb763f2 --- /dev/null +++ b/scstadmin/systemd/scst.service @@ -0,0 +1,20 @@ +[Unit] +Description=SCST - A Generic SCSI Target Subsystem +Documentation=man:scstadmin(1) man:scst.conf(5) +After=network-online.target local-fs.target +Wants=network-online.target +DefaultDependencies=no +Before=shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-/etc/default/scst +ExecStart=/etc/init.d/scst start +ExecStop=/etc/init.d/scst stop +ExecReload=/etc/init.d/scst reload +TimeoutStartSec=5min +TimeoutStopSec=5min + +[Install] +WantedBy=multi-user.target |
|
From: Gleb C. <lna...@ya...> - 2025-10-21 09:23:15
|
Commit: 08f5f43 GitHub URL: https://github.com/SCST-project/scst/commit/08f5f43df82f70c44b2ab13356adee9346d9dc77 Author: Gleb Chesnokov Date: 2025-10-21T12:18:36+03:00 Log Message: ----------- fcst: Fix multiple checkpatch warnings This patch does not change any functionality. Modified Paths: -------------- fcst/ft_cmd.c | 10 ++++++---- fcst/ft_io.c | 8 +++++--- fcst/ft_scst.c | 2 +- fcst/ft_sess.c | 11 +++++------ 4 files changed, 17 insertions(+), 14 deletions(-) =================================================================== diff --git a/fcst/ft_cmd.c b/fcst/ft_cmd.c index 3519a0a..2185187 100644 --- a/fcst/ft_cmd.c +++ b/fcst/ft_cmd.c @@ -213,9 +213,10 @@ int ft_send_response(struct scst_cmd *cmd) scst_cmd_get_resp_data_len(cmd); if (bi_resid) len += sizeof(__be32); - } else + } else { resid = (signed int)scst_cmd_get_bufflen(cmd) - scst_cmd_get_resp_data_len(cmd); + } } fp = fc_frame_alloc(lport, len); @@ -237,16 +238,18 @@ int ft_send_response(struct scst_cmd *cmd) if (bi_resid < 0) { fcp->resp.fr_flags |= FCP_BIDI_READ_OVER; bi_resid = -bi_resid; - } else + } else { fcp->resp.fr_flags |= FCP_BIDI_READ_UNDER; + } *(__be32 *)((u8 *)(fcp + 1) + slen) = htonl(bi_resid); } if (resid) { if (resid < 0) { resid = -resid; fcp->resp.fr_flags |= FCP_RESID_OVER; - } else + } else { fcp->resp.fr_flags |= FCP_RESID_UNDER; + } fcp->ext.fr_resid = htonl(resid); } FT_IO_DBG("response did %x oxid %x\n", ep->did, ep->oxid); @@ -285,7 +288,6 @@ err: "%s: invalid error code %d\n", __func__, error); return error; - } /* diff --git a/fcst/ft_io.c b/fcst/ft_io.c index face322..c225107 100644 --- a/fcst/ft_io.c +++ b/fcst/ft_io.c @@ -81,7 +81,7 @@ int ft_send_read_data(struct scst_cmd *cmd) return SCST_TGT_RES_SUCCESS; } FT_IO_DBG("sid %x oxid %x mem_len %zd frame_off %u remaining %zd\n", - ep->sid, ep->oxid, mem_len, frame_off, remaining); + ep->sid, ep->oxid, mem_len, frame_off, remaining); /* * If we've already transferred some of the data, skip through @@ -99,12 +99,13 @@ int ft_send_read_data(struct scst_cmd *cmd) } mem_len -= tlen; mem_off = tlen; - } else + } else { #ifdef NEW_LIBFC_API fcmd->seq = fc_seq_start_next(fcmd->seq); #else fcmd->seq = lport->tt.seq_start_next(fcmd->seq); #endif + } /* no scatter/gather in skb for odd word length due to fc_seq_send() */ use_sg = !(remaining % 4) && lport->sg_supp; @@ -202,8 +203,9 @@ int ft_send_read_data(struct scst_cmd *cmd) "retrying" : "giving up"); return error == -ENOMEM ? SCST_TGT_RES_QUEUE_FULL : SCST_TGT_RES_FATAL_ERROR; - } else + } else { fcmd->read_data_len = frame_off; + } } if (mem_len) scst_put_buf(cmd, from); diff --git a/fcst/ft_scst.c b/fcst/ft_scst.c index 447884a..6d88020 100644 --- a/fcst/ft_scst.c +++ b/fcst/ft_scst.c @@ -22,7 +22,7 @@ #include "fcst.h" unsigned int ft_debug_logging; -module_param_named(debug_logging, ft_debug_logging, int, S_IRUGO | S_IWUSR); +module_param_named(debug_logging, ft_debug_logging, int, 0644); MODULE_PARM_DESC(debug_logging, "log levels bigmask"); DEFINE_MUTEX(ft_lport_lock); diff --git a/fcst/ft_sess.c b/fcst/ft_sess.c index 237457b..5dee7af 100644 --- a/fcst/ft_sess.c +++ b/fcst/ft_sess.c @@ -301,8 +301,7 @@ static void ft_sess_close(struct ft_sess *sess) /* * Allocate and fill in the SPC Transport ID for persistent reservations. */ -int ft_get_transport_id(struct scst_tgt *tgt, struct scst_session *scst_sess, - uint8_t **result) +int ft_get_transport_id(struct scst_tgt *tgt, struct scst_session *scst_sess, uint8_t **result) { struct ft_sess *sess; struct { @@ -413,7 +412,7 @@ static int ft_prli(struct fc_rport_priv *rdata, u32 spp_len, ret = ft_prli_locked(rdata, spp_len, rspp, spp); mutex_unlock(&ft_lport_lock); FT_SESS_DBG("port_id %x flags %x ret %x\n", - rdata->ids.port_id, rspp ? rspp->spp_flags : 0, ret); + rdata->ids.port_id, rspp ? rspp->spp_flags : 0, ret); return ret; } @@ -486,7 +485,7 @@ static void ft_recv(struct fc_lport *lport, struct fc_frame *fp) return; } FT_SESS_DBG("sid %x sess lookup returned %p preempt %x\n", - sid, sess, preempt_count()); + sid, sess, preempt_count()); ft_recv_req(sess, fp); ft_sess_put(sess); } @@ -523,7 +522,7 @@ int ft_tgt_enable(struct scst_tgt *tgt, bool enable) if (enable) { FT_SESS_DBG("enable tgt %s\n", tgt->tgt_name); tport = scst_tgt_get_tgt_priv(tgt); - if (tport == NULL) { + if (!tport) { ret = -E_TGT_PRIV_NOT_YET_SET; goto out; } @@ -542,7 +541,7 @@ bool ft_tgt_enabled(struct scst_tgt *tgt) { struct ft_tport *tport; - if (tgt == NULL) + if (!tgt) return false; tport = scst_tgt_get_tgt_priv(tgt); |
|
From: Gleb C. <lna...@ya...> - 2025-10-21 09:22:40
|
Commit: dff8aed GitHub URL: https://github.com/SCST-project/scst/commit/dff8aedcaaca47a9b1422553d6e9dea0a98994a5 Author: Gleb Chesnokov Date: 2025-10-21T12:18:36+03:00 Log Message: ----------- scst_priv.h: Drop redundant 'extern' from function prototypes This patch does not change any functionality. Modified Paths: -------------- scst/src/scst_priv.h | 32 +++++++-------- 1 file changed, 16 insertions(+), 16 deletions(-) =================================================================== diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index 3f0313c..226724e 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -264,17 +264,17 @@ static inline void scst_reset_io_context(struct scst_tgt_dev *tgt_dev, struct io * Converts string presentation of threads pool type to enum. * Returns SCST_THREADS_POOL_TYPE_INVALID if the string is invalid. */ -extern enum scst_dev_type_threads_pool_type scst_parse_threads_pool_type(const char *p, int len); +enum scst_dev_type_threads_pool_type scst_parse_threads_pool_type(const char *p, int len); -extern int scst_add_threads(struct scst_cmd_threads *cmd_threads, struct scst_device *dev, - struct scst_tgt_dev *tgt_dev, int num); -extern void scst_del_threads(struct scst_cmd_threads *cmd_threads, int num); +int scst_add_threads(struct scst_cmd_threads *cmd_threads, struct scst_device *dev, + struct scst_tgt_dev *tgt_dev, int num); +void scst_del_threads(struct scst_cmd_threads *cmd_threads, int num); -extern int scst_create_dev_threads(struct scst_device *dev); -extern void scst_stop_dev_threads(struct scst_device *dev); +int scst_create_dev_threads(struct scst_device *dev); +void scst_stop_dev_threads(struct scst_device *dev); -extern int scst_tgt_dev_setup_threads(struct scst_tgt_dev *tgt_dev); -extern void scst_tgt_dev_stop_threads(struct scst_tgt_dev *tgt_dev); +int scst_tgt_dev_setup_threads(struct scst_tgt_dev *tgt_dev); +void scst_tgt_dev_stop_threads(struct scst_tgt_dev *tgt_dev); extern struct scst_dev_type scst_null_devtype; @@ -282,10 +282,10 @@ char *scst_get_cmd_state_name(char *name, int len, unsigned int state); char *scst_get_mcmd_state_name(char *name, int len, unsigned int state); char *scst_get_tm_fn_name(char *name, int len, unsigned int fn); -extern struct scst_cmd *__scst_check_deferred_commands_locked(struct scst_order_data *order_data, - bool return_first); -extern struct scst_cmd *__scst_check_deferred_commands(struct scst_order_data *order_data, +struct scst_cmd *__scst_check_deferred_commands_locked(struct scst_order_data *order_data, bool return_first); +struct scst_cmd *__scst_check_deferred_commands(struct scst_order_data *order_data, + bool return_first); /* Used to save the function call on the fast path */ static inline struct scst_cmd *scst_check_deferred_commands(struct scst_order_data *order_data, @@ -763,11 +763,11 @@ int scst_cm_init(void); void scst_cm_exit(void); #ifdef CONFIG_SCST_DEBUG_TM -extern void tm_dbg_check_released_cmds(void); -extern int tm_dbg_check_cmd(struct scst_cmd *cmd); -extern void tm_dbg_release_cmd(struct scst_cmd *cmd); -extern void tm_dbg_task_mgmt(struct scst_device *dev, const char *fn, int force); -extern int tm_dbg_is_release(void); +void tm_dbg_check_released_cmds(void); +int tm_dbg_check_cmd(struct scst_cmd *cmd); +void tm_dbg_release_cmd(struct scst_cmd *cmd); +void tm_dbg_task_mgmt(struct scst_device *dev, const char *fn, int force); +int tm_dbg_is_release(void); #else static inline void tm_dbg_check_released_cmds(void) { |
|
From: Gleb C. <lna...@ya...> - 2025-10-21 09:22:27
|
Commit: 3928d6d GitHub URL: https://github.com/SCST-project/scst/commit/3928d6d74ff63b777be61b1e046cd40b755279b2 Author: Gleb Chesnokov Date: 2025-10-21T12:18:36+03:00 Log Message: ----------- iscsi-scst: Drop redundant 'extern' from function prototypes This patch does not change any functionality. Modified Paths: -------------- iscsi-scst/include/iscsit_transport.h | 6 +- iscsi-scst/kernel/digest.h | 15 +- iscsi-scst/kernel/iscsi.h | 175 +++++++-------- iscsi-scst/kernel/iscsi_dbg.h | 5 +- 4 files changed, 102 insertions(+), 99 deletions(-) =================================================================== diff --git a/iscsi-scst/include/iscsit_transport.h b/iscsi-scst/include/iscsit_transport.h index 116f724..5528904 100644 --- a/iscsi-scst/include/iscsit_transport.h +++ b/iscsi-scst/include/iscsit_transport.h @@ -61,8 +61,8 @@ struct iscsit_transport { struct list_head transport_list_entry; } ____cacheline_aligned; -extern int iscsit_reg_transport(struct iscsit_transport *t); -extern void iscsit_unreg_transport(struct iscsit_transport *t); -extern struct iscsit_transport *iscsit_get_transport(enum iscsit_transport_type type); +int iscsit_reg_transport(struct iscsit_transport *t); +void iscsit_unreg_transport(struct iscsit_transport *t); +struct iscsit_transport *iscsit_get_transport(enum iscsit_transport_type type); #endif /* __ISCSI_TRANSPORT_H__ */ diff --git a/iscsi-scst/kernel/digest.h b/iscsi-scst/kernel/digest.h index 8ed9bf4..95df376 100644 --- a/iscsi-scst/kernel/digest.h +++ b/iscsi-scst/kernel/digest.h @@ -18,14 +18,17 @@ #ifndef __ISCSI_DIGEST_H__ #define __ISCSI_DIGEST_H__ -extern void digest_alg_available(int *val); +struct iscsi_conn; +struct iscsi_cmnd; -extern int digest_init(struct iscsi_conn *conn); +void digest_alg_available(int *val); -extern int digest_rx_header(struct iscsi_cmnd *cmnd); -extern int digest_rx_data(struct iscsi_cmnd *cmnd); +int digest_init(struct iscsi_conn *conn); -extern void digest_tx_header(struct iscsi_cmnd *cmnd); -extern void digest_tx_data(struct iscsi_cmnd *cmnd); +int digest_rx_header(struct iscsi_cmnd *cmnd); +int digest_rx_data(struct iscsi_cmnd *cmnd); + +void digest_tx_header(struct iscsi_cmnd *cmnd); +void digest_tx_data(struct iscsi_cmnd *cmnd); #endif /* __ISCSI_DIGEST_H__ */ diff --git a/iscsi-scst/kernel/iscsi.h b/iscsi-scst/kernel/iscsi.h index 8b9728c..e0eac07 100644 --- a/iscsi-scst/kernel/iscsi.h +++ b/iscsi-scst/kernel/iscsi.h @@ -531,96 +531,96 @@ extern struct kmem_cache *iscsi_conn_cache; extern struct kmem_cache *iscsi_sess_cache; /* iscsi.c */ -extern int cmnd_rx_start(struct iscsi_cmnd *cmnd); -extern int cmnd_rx_continue(struct iscsi_cmnd *req); -extern void cmnd_rx_end(struct iscsi_cmnd *cmnd); -extern void cmnd_tx_start(struct iscsi_cmnd *cmnd); -extern void cmnd_tx_end(struct iscsi_cmnd *cmnd); -extern void req_cmnd_release_force(struct iscsi_cmnd *req); -extern void rsp_cmnd_release(struct iscsi_cmnd *cmnd); -extern void iscsi_drop_delayed_tm_rsp(struct iscsi_cmnd *tm_rsp); -extern void cmnd_done(struct iscsi_cmnd *cmnd); -extern void conn_abort(struct iscsi_conn *conn); -extern void iscsi_restart_cmnd(struct iscsi_cmnd *cmnd); -extern void iscsi_fail_data_waiting_cmnd(struct iscsi_cmnd *cmnd); -extern void iscsi_send_nop_in(struct iscsi_conn *conn); -extern int iscsi_preliminary_complete(struct iscsi_cmnd *req, struct iscsi_cmnd *orig_req, - bool get_data); -extern int set_scst_preliminary_status_rsp(struct iscsi_cmnd *req, bool get_data, int key, int asc, - int ascq); -extern int iscsi_threads_pool_get(bool dedicated, const cpumask_t *cpu_mask, - struct iscsi_thread_pool **out_pool); -extern void iscsi_threads_pool_put(struct iscsi_thread_pool *p); +int cmnd_rx_start(struct iscsi_cmnd *cmnd); +int cmnd_rx_continue(struct iscsi_cmnd *req); +void cmnd_rx_end(struct iscsi_cmnd *cmnd); +void cmnd_tx_start(struct iscsi_cmnd *cmnd); +void cmnd_tx_end(struct iscsi_cmnd *cmnd); +void req_cmnd_release_force(struct iscsi_cmnd *req); +void rsp_cmnd_release(struct iscsi_cmnd *cmnd); +void iscsi_drop_delayed_tm_rsp(struct iscsi_cmnd *tm_rsp); +void cmnd_done(struct iscsi_cmnd *cmnd); +void conn_abort(struct iscsi_conn *conn); +void iscsi_restart_cmnd(struct iscsi_cmnd *cmnd); +void iscsi_fail_data_waiting_cmnd(struct iscsi_cmnd *cmnd); +void iscsi_send_nop_in(struct iscsi_conn *conn); +int iscsi_preliminary_complete(struct iscsi_cmnd *req, struct iscsi_cmnd *orig_req, bool get_data); +int set_scst_preliminary_status_rsp(struct iscsi_cmnd *req, bool get_data, int key, int asc, + int ascq); +int iscsi_threads_pool_get(bool dedicated, const cpumask_t *cpu_mask, + struct iscsi_thread_pool **out_pool); +void iscsi_threads_pool_put(struct iscsi_thread_pool *p); /* conn.c */ extern struct kobj_type iscsi_conn_ktype; -extern struct iscsi_conn *conn_lookup(struct iscsi_session *session, u16 cid); -extern void conn_reinst_finished(struct iscsi_conn *conn); -extern int __add_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info); -extern int __del_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info); -extern void conn_free(struct iscsi_conn *conn); -extern void iscsi_make_conn_rd_active(struct iscsi_conn *conn); + +struct iscsi_conn *conn_lookup(struct iscsi_session *session, u16 cid); +void conn_reinst_finished(struct iscsi_conn *conn); +int __add_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info); +int __del_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info); +void conn_free(struct iscsi_conn *conn); +void iscsi_make_conn_rd_active(struct iscsi_conn *conn); #define ISCSI_CONN_ACTIVE_CLOSE 1 #define ISCSI_CONN_DELETING 2 -extern void __mark_conn_closed(struct iscsi_conn *conn, int flags); -extern void mark_conn_closed(struct iscsi_conn *conn); -extern void iscsi_make_conn_wr_active(struct iscsi_conn *conn); -extern void iscsi_check_tm_data_wait_timeouts(struct iscsi_conn *conn, bool force); -extern void __iscsi_write_space_ready(struct iscsi_conn *conn); +void __mark_conn_closed(struct iscsi_conn *conn, int flags); +void mark_conn_closed(struct iscsi_conn *conn); +void iscsi_make_conn_wr_active(struct iscsi_conn *conn); +void iscsi_check_tm_data_wait_timeouts(struct iscsi_conn *conn, bool force); +void __iscsi_write_space_ready(struct iscsi_conn *conn); /* nthread.c */ -extern int iscsi_send(struct iscsi_conn *conn); -extern int istrd(void *arg); -extern int istwr(void *arg); -extern void iscsi_task_mgmt_affected_cmds_done(struct scst_mgmt_cmd *scst_mcmd); -extern void req_add_to_write_timeout_list(struct iscsi_cmnd *req); +int iscsi_send(struct iscsi_conn *conn); +int istrd(void *arg); +int istwr(void *arg); +void iscsi_task_mgmt_affected_cmds_done(struct scst_mgmt_cmd *scst_mcmd); +void req_add_to_write_timeout_list(struct iscsi_cmnd *req); /* target.c */ extern const struct attribute *iscsi_tgt_attrs[]; -extern int iscsi_enable_target(struct scst_tgt *scst_tgt, bool enable); -extern bool iscsi_is_target_enabled(struct scst_tgt *scst_tgt); -extern ssize_t iscsi_sysfs_send_event(uint32_t tid, enum iscsi_kern_event_code code, - const char *param1, const char *param2, void **data); -extern struct iscsi_target *target_lookup_by_id(u32 id); -extern int __add_target(struct iscsi_kern_target_info *info); -extern int __del_target(u32 id); -extern ssize_t iscsi_sysfs_add_target(const char *target_name, char *params); -extern ssize_t iscsi_sysfs_del_target(const char *target_name); -extern ssize_t iscsi_sysfs_mgmt_cmd(char *cmd); -extern void target_del_session(struct iscsi_target *target, struct iscsi_session *session, - int flags); -extern void target_del_all_sess(struct iscsi_target *target, int flags); -extern void target_del_all(void); + +int iscsi_enable_target(struct scst_tgt *scst_tgt, bool enable); +bool iscsi_is_target_enabled(struct scst_tgt *scst_tgt); +ssize_t iscsi_sysfs_send_event(uint32_t tid, enum iscsi_kern_event_code code, const char *param1, + const char *param2, void **data); +struct iscsi_target *target_lookup_by_id(u32 id); +int __add_target(struct iscsi_kern_target_info *info); +int __del_target(u32 id); +ssize_t iscsi_sysfs_add_target(const char *target_name, char *params); +ssize_t iscsi_sysfs_del_target(const char *target_name); +ssize_t iscsi_sysfs_mgmt_cmd(char *cmd); +void target_del_session(struct iscsi_target *target, struct iscsi_session *session, int flags); +void target_del_all_sess(struct iscsi_target *target, int flags); +void target_del_all(void); /* config.c */ -extern int conn_sysfs_add(struct iscsi_conn *conn); extern const struct attribute *iscsi_attrs[]; -extern int iscsi_add_attr(struct iscsi_target *target, const struct iscsi_kern_attr *user_info); -extern void __iscsi_del_attr(struct iscsi_target *target, struct iscsi_attr *tgt_attr); + +int conn_sysfs_add(struct iscsi_conn *conn); +int iscsi_add_attr(struct iscsi_target *target, const struct iscsi_kern_attr *user_info); +void __iscsi_del_attr(struct iscsi_target *target, struct iscsi_attr *tgt_attr); /* session.c */ extern const struct attribute *iscsi_sess_attrs[]; extern const struct attribute *iscsi_acg_attrs[]; extern const struct file_operations session_seq_fops; -extern struct iscsi_session *session_lookup(struct iscsi_target *target, - u64 sid); -extern void sess_reinst_finished(struct iscsi_session *session); -extern int __add_session(struct iscsi_target *target, struct iscsi_kern_session_info *info); -extern int __del_session(struct iscsi_target *target, u64 sid); -extern int session_free(struct iscsi_session *session, bool del); -extern void iscsi_sess_force_close(struct iscsi_session *sess); + +struct iscsi_session *session_lookup(struct iscsi_target *target, u64 sid); +void sess_reinst_finished(struct iscsi_session *session); +int __add_session(struct iscsi_target *target, struct iscsi_kern_session_info *info); +int __del_session(struct iscsi_target *target, u64 sid); +int session_free(struct iscsi_session *session, bool del); +void iscsi_sess_force_close(struct iscsi_session *sess); /* params.c */ -extern const char *iscsi_get_digest_name(int val, char *res); -extern const char *iscsi_get_bool_value(int val); -extern int iscsi_params_set(struct iscsi_target *target, struct iscsi_kern_params_info *info, - int set); +const char *iscsi_get_digest_name(int val, char *res); +const char *iscsi_get_bool_value(int val); +int iscsi_params_set(struct iscsi_target *target, struct iscsi_kern_params_info *info, int set); /* event.c */ -extern int event_send(u32 tid, u64 sid, u32 cid, u32 cookie, enum iscsi_kern_event_code code, - const char *param1, const char *param2); -extern int event_init(void); -extern void event_exit(void); +int event_send(u32 tid, u64 sid, u32 cid, u32 cookie, enum iscsi_kern_event_code code, + const char *param1, const char *param2); +int event_init(void); +void event_exit(void); #define get_pgcnt(size, offset) \ ((((size) + ((offset) & ~PAGE_MASK)) + PAGE_SIZE - 1) >> PAGE_SHIFT) @@ -803,29 +803,28 @@ static inline void conn_put(struct iscsi_conn *conn) } #ifdef CONFIG_SCST_EXTRACHECKS -extern void iscsi_extracheck_is_rd_thread(struct iscsi_conn *conn); -extern void iscsi_extracheck_is_wr_thread(struct iscsi_conn *conn); +void iscsi_extracheck_is_rd_thread(struct iscsi_conn *conn); +void iscsi_extracheck_is_wr_thread(struct iscsi_conn *conn); #else static inline void iscsi_extracheck_is_rd_thread(struct iscsi_conn *conn) {} static inline void iscsi_extracheck_is_wr_thread(struct iscsi_conn *conn) {} #endif -extern int iscsi_conn_alloc(struct iscsi_session *session, struct iscsi_kern_conn_info *info, - struct iscsi_conn **new_conn, struct iscsit_transport *t); - -extern int conn_activate(struct iscsi_conn *conn); -extern void iscsi_tcp_mark_conn_closed(struct iscsi_conn *conn, int flags); -extern void iscsi_tcp_conn_free(struct iscsi_conn *conn); -extern void iscsi_cmnd_init(struct iscsi_conn *conn, struct iscsi_cmnd *cmnd, - struct iscsi_cmnd *parent); -extern struct iscsi_cmnd *iscsi_get_send_cmnd(struct iscsi_conn *conn); -extern void start_close_conn(struct iscsi_conn *conn); -extern __be32 cmnd_set_sn(struct iscsi_cmnd *cmnd, int set_stat_sn); -extern void iscsi_set_resid(struct iscsi_cmnd *rsp); -extern int iscsi_init_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info, - struct iscsi_conn *conn); -extern void req_cmnd_pre_release(struct iscsi_cmnd *req); -extern struct iscsi_cmnd *create_status_rsp(struct iscsi_cmnd *req, int status, - const u8 *sense_buf, int sense_len); -extern int iscsi_cmnd_set_write_buf(struct iscsi_cmnd *req); +int iscsi_conn_alloc(struct iscsi_session *session, struct iscsi_kern_conn_info *info, + struct iscsi_conn **new_conn, struct iscsit_transport *t); + +int conn_activate(struct iscsi_conn *conn); +void iscsi_tcp_mark_conn_closed(struct iscsi_conn *conn, int flags); +void iscsi_tcp_conn_free(struct iscsi_conn *conn); +void iscsi_cmnd_init(struct iscsi_conn *conn, struct iscsi_cmnd *cmnd, struct iscsi_cmnd *parent); +struct iscsi_cmnd *iscsi_get_send_cmnd(struct iscsi_conn *conn); +void start_close_conn(struct iscsi_conn *conn); +__be32 cmnd_set_sn(struct iscsi_cmnd *cmnd, int set_stat_sn); +void iscsi_set_resid(struct iscsi_cmnd *rsp); +int iscsi_init_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info, + struct iscsi_conn *conn); +void req_cmnd_pre_release(struct iscsi_cmnd *req); +struct iscsi_cmnd *create_status_rsp(struct iscsi_cmnd *req, int status, const u8 *sense_buf, + int sense_len); +int iscsi_cmnd_set_write_buf(struct iscsi_cmnd *req); #endif /* __ISCSI_H__ */ diff --git a/iscsi-scst/kernel/iscsi_dbg.h b/iscsi-scst/kernel/iscsi_dbg.h index 550e79b..144081c 100644 --- a/iscsi-scst/kernel/iscsi_dbg.h +++ b/iscsi-scst/kernel/iscsi_dbg.h @@ -47,8 +47,9 @@ #ifdef CONFIG_SCST_DEBUG struct iscsi_pdu; struct iscsi_cmnd; -extern void iscsi_dump_pdu(struct iscsi_pdu *pdu); -extern unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(struct iscsi_cmnd *cmnd); + +void iscsi_dump_pdu(struct iscsi_pdu *pdu); +unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(struct iscsi_cmnd *cmnd); #else #define iscsi_dump_pdu(x) do {} while (0) #define iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(x) 0 |
|
From: Gleb C. <lna...@ya...> - 2025-10-21 09:22:03
|
Commit: 6a2b3e3 GitHub URL: https://github.com/SCST-project/scst/commit/6a2b3e36e41e5eeae0f717d0ff01d797a0f08795 Author: Gleb Chesnokov Date: 2025-10-21T12:18:36+03:00 Log Message: ----------- ib_srpt: Fix multiple checkpatch warnings This patch does not change any functionality. Modified Paths: -------------- srpt/src/ib_srpt.c | 150 +++++++-------- 1 file changed, 66 insertions(+), 84 deletions(-) =================================================================== diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 07d628c..270fae0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -72,8 +72,7 @@ #define DEFAULT_SRPT_ID_STRING "SCST SRP target" MODULE_AUTHOR("Vu Pham and Bart Van Assche"); -MODULE_DESCRIPTION("SCSI RDMA Protocol target driver " - "v" DRV_VERSION " (" DRV_RELDATE ")"); +MODULE_DESCRIPTION("SCSI RDMA Protocol target driver v" DRV_VERSION " (" DRV_RELDATE ")"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SCST_NAMESPACE); @@ -104,16 +103,16 @@ MODULE_PARM_DESC(srp_max_req_size, "Maximum size of SRP request messages in bytes."); static unsigned int srp_max_rsp_size = DEFAULT_MAX_RSP_SIZE; -module_param(srp_max_rsp_size, int, S_IRUGO | S_IWUSR); +module_param(srp_max_rsp_size, int, 0644); MODULE_PARM_DESC(srp_max_rsp_size, "Maximum size of SRP response messages in bytes."); static bool use_srq; -module_param(use_srq, bool, S_IRUGO | S_IWUSR); +module_param(use_srq, bool, 0644); MODULE_PARM_DESC(use_srq, "Whether or not to use SRQ"); static int srpt_srq_size = DEFAULT_SRPT_SRQ_SIZE; -module_param(srpt_srq_size, int, S_IRUGO | S_IWUSR); +module_param(srpt_srq_size, int, 0644); MODULE_PARM_DESC(srpt_srq_size, "Shared receive queue (SRQ) size."); @@ -432,14 +431,12 @@ static void srpt_get_ioc(struct srpt_port *sport, u32 slot, iocp = (struct ib_dm_ioc_profile *)mad->data; if (!slot || slot > 16) { - mad->mad_hdr.status - = cpu_to_be16(DM_MAD_STATUS_INVALID_FIELD); + mad->mad_hdr.status = cpu_to_be16(DM_MAD_STATUS_INVALID_FIELD); return; } if (slot > 2) { - mad->mad_hdr.status - = cpu_to_be16(DM_MAD_STATUS_NO_IOC); + mad->mad_hdr.status = cpu_to_be16(DM_MAD_STATUS_NO_IOC); return; } @@ -495,14 +492,12 @@ static void srpt_get_svc_entries(u64 ioc_guid, WARN_ON(!ioc_guid); if (!slot || slot > 16) { - mad->mad_hdr.status - = cpu_to_be16(DM_MAD_STATUS_INVALID_FIELD); + mad->mad_hdr.status = cpu_to_be16(DM_MAD_STATUS_INVALID_FIELD); return; } if (slot > 2 || lo > hi || hi > 1) { - mad->mad_hdr.status - = cpu_to_be16(DM_MAD_STATUS_NO_IOC); + mad->mad_hdr.status = cpu_to_be16(DM_MAD_STATUS_NO_IOC); return; } @@ -545,9 +540,9 @@ static void srpt_mgmt_method_get(struct srpt_port *sp, struct ib_mad *rq_mad, break; case DM_ATTR_SVC_ENTRIES: slot = be32_to_cpu(rq_mad->mad_hdr.attr_mod); - hi = (u8) ((slot >> 8) & 0xff); - lo = (u8) (slot & 0xff); - slot = (u16) ((slot >> 16) & 0xffff); + hi = (u8)((slot >> 8) & 0xff); + lo = (u8)(slot & 0xff); + slot = (u16)((slot >> 16) & 0xffff); srpt_get_svc_entries(srpt_service_guid, slot, hi, lo, rsp_mad); break; @@ -840,11 +835,9 @@ static void srpt_free_ioctx(struct srpt_device *sdev, struct srpt_ioctx *ioctx, * unit starts. * @dir: DMA data direction. */ -static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev, - int ring_size, int ioctx_size, - struct kmem_cache *buf_cache, - int alignment_offset, - enum dma_data_direction dir) +static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev, int ring_size, + int ioctx_size, struct kmem_cache *buf_cache, + int alignment_offset, enum dma_data_direction dir) { struct srpt_ioctx **ring; int i; @@ -1146,9 +1139,9 @@ static int srpt_get_desc_tbl(struct srpt_recv_ioctx *recv_ioctx, return -EINVAL; } - if (ioctx->n_rbuf == 1) + if (ioctx->n_rbuf == 1) { ioctx->rbufs = &ioctx->single_rbuf; - else { + } else { ioctx->rbufs = kmalloc_array(ioctx->n_rbuf, sizeof(*db), GFP_ATOMIC); if (!ioctx->rbufs) { @@ -1441,8 +1434,7 @@ static void srpt_abort_cmd(struct srpt_send_ioctx *ioctx, break; case SRPT_STATE_NEED_DATA: pr_debug("tag %#llx: RDMA read error\n", ioctx->cmd.tag); - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_write_error)); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_write_error)); scst_rx_data(cmd, SCST_RX_STATUS_ERROR_SENSE_SET, context); break; case SRPT_STATE_CMD_RSP_SENT: @@ -1753,7 +1745,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, srp_cmd = recv_ioctx->ioctx.buf + recv_ioctx->ioctx.offset; cmd = &send_ioctx->cmd; - ret = scst_rx_cmd_prealloced(cmd, ch->sess, (u8 *) &srp_cmd->lun, + ret = scst_rx_cmd_prealloced(cmd, ch->sess, (u8 *)&srp_cmd->lun, sizeof(srp_cmd->lun), srp_cmd->cdb, sizeof(srp_cmd->cdb), in_interrupt()); if (ret) { @@ -1767,8 +1759,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, if (ret) { pr_err("0x%llx: parsing SRP descriptor table failed.\n", srp_cmd->tag); - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_invalid_field_in_cdb)); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_field_in_cdb)); } switch (srp_cmd->task_attr) { @@ -2262,8 +2253,7 @@ retry: ib_req_notify_cq(ch->cq, IB_CQ_NEXT_COMP); qp_init->qp_context = (void *)ch; - qp_init->event_handler - = (void(*)(struct ib_event *, void*))srpt_qp_event; + qp_init->event_handler = (void(*)(struct ib_event *, void*))srpt_qp_event; qp_init->send_cq = ch->cq; qp_init->recv_cq = ch->cq; qp_init->sq_sig_type = IB_SIGNAL_REQ_WR; @@ -2276,11 +2266,10 @@ retry: #endif qp_init->cap.max_send_sge = ch->max_send_sge; qp_init->cap.max_recv_sge = 1; - if (sdev->use_srq) { + if (sdev->use_srq) qp_init->srq = sdev->srq; - } else { + else qp_init->cap.max_recv_wr = ch->rq_size; - } if (ch->using_rdma_cm) { ret = rdma_create_qp(ch->rdma_cm.cm_id, sdev->pd, qp_init); @@ -2319,9 +2308,9 @@ retry: atomic_set(&ch->sq_wr_avail, qp_init->cap.max_send_wr); - pr_debug("%s: max_cqe= %d max_sge= %d sq_size = %d ch= %p\n", __func__, - ch->cq->cqe, qp_init->cap.max_send_sge, - qp_init->cap.max_send_wr, ch); + pr_debug("%s: max_cqe= %d max_sge= %d sq_size = %d ch= %p\n", + __func__, ch->cq->cqe, qp_init->cap.max_send_sge, + qp_init->cap.max_send_wr, ch); out: kfree(qp_init); @@ -2584,8 +2573,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, ret = -EINVAL; if (it_iu_len > srp_max_req_size || it_iu_len < 64) { - rej->reason = cpu_to_be32( - SRP_LOGIN_REJ_REQ_IT_IU_LENGTH_TOO_LARGE); + rej->reason = cpu_to_be32(SRP_LOGIN_REJ_REQ_IT_IU_LENGTH_TOO_LARGE); pr_err("rejected SRP_LOGIN_REQ because its length (%d bytes) is out of range (%d .. %d)\n", it_iu_len, 64, srp_max_req_size); goto reject; @@ -2598,11 +2586,9 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, goto reject; } - if (*(__be64 *)req->target_port_id != cpu_to_be64(srpt_service_guid) - || *(__be64 *)(req->target_port_id + 8) != - cpu_to_be64(srpt_service_guid)) { - rej->reason = cpu_to_be32( - SRP_LOGIN_REJ_UNABLE_ASSOCIATE_CHANNEL); + if (*(__be64 *)req->target_port_id != cpu_to_be64(srpt_service_guid) || + *(__be64 *)(req->target_port_id + 8) != cpu_to_be64(srpt_service_guid)) { + rej->reason = cpu_to_be32(SRP_LOGIN_REJ_UNABLE_ASSOCIATE_CHANNEL); pr_err("rejected SRP_LOGIN_REQ because it has an invalid target port identifier.\n"); goto reject; } @@ -2739,8 +2725,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, list_add_tail_rcu(&ch->list, &nexus->ch_list); if (!sport->enabled) { - rej->reason = cpu_to_be32( - SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES); + rej->reason = cpu_to_be32(SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES); pr_info("rejected SRP_LOGIN_REQ because the target %s (%s) is not enabled\n", sport->scst_tgt->tgt_name, dev_name(&sdev->device->dev)); @@ -2962,10 +2947,13 @@ static void srpt_cm_rej_recv(struct srpt_rdma_ch *ch, char *priv = NULL; int i; - if (private_data_len && (priv = kmalloc(private_data_len * 3 + 1, - GFP_KERNEL))) { - for (i = 0; i < private_data_len; i++) - sprintf(priv + 3 * i, " %02x", private_data[i]); + if (private_data_len) { + priv = kmalloc(private_data_len * 3 + 1, GFP_KERNEL); + + if (priv) { + for (i = 0; i < private_data_len; i++) + sprintf(priv + 3 * i, " %02x", private_data[i]); + } } pr_info("Received CM REJ for ch %s-%d; reason %d%s%s.\n", ch->sess_name, ch->qp->qp_num, reason, private_data_len ? @@ -2998,8 +2986,8 @@ static void srpt_check_timeout(struct srpt_rdma_ch *ch) T_tr_ms = T_tr_ns; do_div(T_tr_ms, 1000000); pr_debug("%s-%d: QP local ack timeout = %d or T_tr = %llu ms; retry_cnt = %d; max compl. time = %d ms\n", - ch->sess_name, ch->qp->qp_num, attr.timeout, T_tr_ms, - attr.retry_cnt, (unsigned int)max_compl_time_ms); + ch->sess_name, ch->qp->qp_num, attr.timeout, T_tr_ms, + attr.retry_cnt, (unsigned int)max_compl_time_ms); if (max_compl_time_ms >= RDMA_COMPL_TIMEOUT_S * 1000) { pr_err("Maximum RDMA completion time (%lld ms) exceeds ib_srpt timeout (%d ms)\n", @@ -3243,7 +3231,6 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, /* calculate how many sge required for this remote_buf */ while (rsize > 0 && tsize > 0) { - if (rsize >= dma_len) { tsize -= dma_len; rsize -= dma_len; @@ -3326,8 +3313,9 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, ++riu; sge = riu->sge; k = 0; - } else if (rsize > 0 && tsize > 0) + } else if (rsize > 0 && tsize > 0) { ++sge; + } } } @@ -3692,8 +3680,7 @@ static int srpt_xmit_response(struct scst_cmd *cmd) scst_copy_sg(cmd, SCST_SG_COPY_TO_TARGET); /* For read commands, transfer the data to the initiator. */ - if (dir == SCST_DATA_READ - && scst_cmd_get_adjusted_resp_data_len(cmd)) { + if (dir == SCST_DATA_READ && scst_cmd_get_adjusted_resp_data_len(cmd)) { ret = srpt_xfer_data(ch, ioctx); if (unlikely(ret != 0)) { srpt_set_cmd_state(ioctx, state); @@ -3766,8 +3753,7 @@ static void srpt_tsk_mgmt_done(struct scst_mgmt_cmd *mcmnd) ioctx->req_lim_delta = srpt_inc_req_lim(ch); rsp_len = srpt_build_tskmgmt_rsp(ch, ioctx, - scst_to_srp_tsk_mgmt_status( - scst_mgmt_cmd_get_status(mcmnd)), + scst_to_srp_tsk_mgmt_status(scst_mgmt_cmd_get_status(mcmnd)), ioctx->tsk_mgmt.tag); /* * Note: the srpt_post_send() call below sends the task management @@ -3787,8 +3773,8 @@ static void srpt_tsk_mgmt_done(struct scst_mgmt_cmd *mcmnd) * * See also SPC-3, section 7.5.4.5, TransportID for initiator ports using SRP. */ -static int srpt_get_initiator_port_transport_id(struct scst_tgt *tgt, - struct scst_session *sess, uint8_t **transport_id) +static int srpt_get_initiator_port_transport_id(struct scst_tgt *tgt, struct scst_session *sess, + uint8_t **transport_id) { struct srpt_rdma_ch *ch; struct spc_rdma_transport_id { @@ -3808,7 +3794,7 @@ static int srpt_get_initiator_port_transport_id(struct scst_tgt *tgt, BUILD_BUG_ON(sizeof(*tr_id) != 24); res = -ENOMEM; - tr_id = kzalloc(sizeof(struct spc_rdma_transport_id), GFP_KERNEL); + tr_id = kzalloc(sizeof(*tr_id), GFP_KERNEL); if (!tr_id) goto out; @@ -4002,8 +3988,7 @@ out: } static struct kobj_attribute srpt_show_comp_v_mask_attr = - __ATTR(comp_v_mask, S_IRUGO | S_IWUSR, show_comp_v_mask, - store_comp_v_mask); + __ATTR(comp_v_mask, 0644, show_comp_v_mask, store_comp_v_mask); static ssize_t srpt_show_device(struct kobject *kobj, struct kobj_attribute *attr, char *buf) @@ -4025,7 +4010,7 @@ out: } static struct kobj_attribute srpt_device_attr = - __ATTR(device, S_IRUGO, srpt_show_device, NULL); + __ATTR(device, 0444, srpt_show_device, NULL); /* * The link layer names in this function match those used by the IB core. @@ -4061,7 +4046,7 @@ out: } static struct kobj_attribute srpt_link_layer_attr = - __ATTR(link_layer, S_IRUGO, srpt_show_link_layer, NULL); + __ATTR(link_layer, 0444, srpt_show_link_layer, NULL); static ssize_t show_port_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { @@ -4115,7 +4100,7 @@ out: } static struct kobj_attribute srpt_port_id_attr = - __ATTR(port_id, S_IRUGO | S_IWUSR, show_port_id, store_port_id); + __ATTR(port_id, 0644, show_port_id, store_port_id); static ssize_t show_login_info(struct kobject *kobj, struct kobj_attribute *attr, char *buf) @@ -4131,14 +4116,14 @@ static ssize_t show_login_info(struct kobject *kobj, res = sysfs_emit(buf, "tid_ext=%016llx,ioc_guid=%016llx,pkey=ffff,dgid=%04x%04x%04x%04x%04x%04x%04x%04x,service_id=%016llx\n", srpt_service_guid, srpt_service_guid, - be16_to_cpu(((__be16 *) sport->gid.raw)[0]), - be16_to_cpu(((__be16 *) sport->gid.raw)[1]), - be16_to_cpu(((__be16 *) sport->gid.raw)[2]), - be16_to_cpu(((__be16 *) sport->gid.raw)[3]), - be16_to_cpu(((__be16 *) sport->gid.raw)[4]), - be16_to_cpu(((__be16 *) sport->gid.raw)[5]), - be16_to_cpu(((__be16 *) sport->gid.raw)[6]), - be16_to_cpu(((__be16 *) sport->gid.raw)[7]), + be16_to_cpu(((__be16 *)sport->gid.raw)[0]), + be16_to_cpu(((__be16 *)sport->gid.raw)[1]), + be16_to_cpu(((__be16 *)sport->gid.raw)[2]), + be16_to_cpu(((__be16 *)sport->gid.raw)[3]), + be16_to_cpu(((__be16 *)sport->gid.raw)[4]), + be16_to_cpu(((__be16 *)sport->gid.raw)[5]), + be16_to_cpu(((__be16 *)sport->gid.raw)[6]), + be16_to_cpu(((__be16 *)sport->gid.raw)[7]), srpt_service_guid); out: @@ -4146,7 +4131,7 @@ out: } static struct kobj_attribute srpt_show_login_info_attr = - __ATTR(login_info, S_IRUGO, show_login_info, NULL); + __ATTR(login_info, 0444, show_login_info, NULL); static const struct attribute *srpt_tgt_attrs[] = { &srpt_show_comp_v_mask_attr.attr, @@ -4215,13 +4200,13 @@ static ssize_t show_comp_vector(struct kobject *kobj, } static const struct kobj_attribute srpt_req_lim_attr = - __ATTR(req_lim, S_IRUGO, show_req_lim, NULL); + __ATTR(req_lim, 0444, show_req_lim, NULL); static const struct kobj_attribute srpt_req_lim_delta_attr = - __ATTR(req_lim_delta, S_IRUGO, show_req_lim_delta, NULL); + __ATTR(req_lim_delta, 0444, show_req_lim_delta, NULL); static const struct kobj_attribute srpt_ch_state_attr = - __ATTR(ch_state, S_IRUGO, show_ch_state, NULL); + __ATTR(ch_state, 0444, show_ch_state, NULL); static const struct kobj_attribute srpt_comp_vector_attr = - __ATTR(comp_vector, S_IRUGO, show_comp_vector, NULL); + __ATTR(comp_vector, 0444, show_comp_vector, NULL); static const struct attribute *srpt_sess_attrs[] = { &srpt_req_lim_attr.attr, @@ -4252,7 +4237,6 @@ static struct scst_tgt_template srpt_template = { .get_scsi_transport_version = srpt_get_scsi_transport_version, }; - /* Note: the caller must have zero-initialized *@sport. */ static void srpt_init_sport(struct srpt_port *sport, struct ib_device *ib_dev) { @@ -4342,8 +4326,8 @@ static int srpt_add_one(struct ib_device *device) sdev->srq_size, sdev->dev_attr.max_srq_wr, device->name); - sdev->req_buf_cache = kmem_cache_create("srpt-srq-req-buf", - srp_max_req_size, 0, 0, NULL); + sdev->req_buf_cache = kmem_cache_create("srpt-srq-req-buf", srp_max_req_size, + 0, 0, NULL); if (!sdev->req_buf_cache) { ret = -ENOMEM; goto free_srq; @@ -4534,7 +4518,6 @@ static struct ib_client srpt_client = { .remove = srpt_remove_one }; - /** * srpt_init_module - kernel module initialization * @@ -4560,8 +4543,7 @@ static int __init srpt_init_module(void) goto out; } - if (srpt_srq_size < MIN_SRPT_SRQ_SIZE - || srpt_srq_size > MAX_SRPT_SRQ_SIZE) { + if (srpt_srq_size < MIN_SRPT_SRQ_SIZE || srpt_srq_size > MAX_SRPT_SRQ_SIZE) { pr_err("invalid value %d for kernel module parameter srpt_srq_size -- must be in the range [%d..%d].\n", srpt_srq_size, MIN_SRPT_SRQ_SIZE, MAX_SRPT_SRQ_SIZE); goto out; |
|
From: Gleb C. <lna...@ya...> - 2025-10-21 09:21:54
|
Commit: 3b6e2ed GitHub URL: https://github.com/SCST-project/scst/commit/3b6e2ed8be55b5f625ae9f27b3a432ce9947d29a Author: Gleb Chesnokov Date: 2025-10-21T12:18:36+03:00 Log Message: ----------- scst_local_cmd: Fix multiple checkpatch warnings This patch does not change any functionality. Modified Paths: -------------- scst/src/scst_local_cmd.c | 254 +++++++-------- 1 file changed, 110 insertions(+), 144 deletions(-) =================================================================== diff --git a/scst/src/scst_local_cmd.c b/scst/src/scst_local_cmd.c index 50157bf..d700b6a 100644 --- a/scst/src/scst_local_cmd.c +++ b/scst/src/scst_local_cmd.c @@ -42,9 +42,10 @@ enum scst_exec_res scst_report_luns_local(struct scst_cmd *cmd) cmd->host_status = DID_OK; cmd->driver_status = 0; - if ((cmd->cdb[2] != 0) && (cmd->cdb[2] != 2)) { - TRACE(TRACE_MINOR, "Unsupported SELECT REPORT value %#x in " - "REPORT LUNS command", cmd->cdb[2]); + if (cmd->cdb[2] != 0 && cmd->cdb[2] != 2) { + TRACE(TRACE_MINOR, + "Unsupported SELECT REPORT value %#x in REPORT LUNS command", + cmd->cdb[2]); scst_set_invalid_field_in_cdb(cmd, 2, 0); goto out_compl; } @@ -74,9 +75,8 @@ enum scst_exec_res scst_report_luns_local(struct scst_cmd *cmd) overflow = 1; goto inc_dev_cnt; } - *(__force __be64 *)&buffer[offs] - = scst_pack_lun(tgt_dev->lun, - cmd->sess->acg->addr_method); + *(__force __be64 *)&buffer[offs] = + scst_pack_lun(tgt_dev->lun, cmd->sess->acg->addr_method); offs += 8; } inc_dev_cnt: @@ -84,15 +84,12 @@ inc_dev_cnt: /* Clear sense_reported_luns_data_changed UA. */ spin_lock_bh(&tgt_dev->tgt_dev_lock); - list_for_each_entry(ua, &tgt_dev->UA_list, - UA_list_entry) { - if (scst_analyze_sense(ua->UA_sense_buffer, - ua->UA_valid_sense_len, - SCST_SENSE_ALL_VALID, - SCST_LOAD_SENSE(scst_sense_reported_luns_data_changed))) { - TRACE_DBG("Freeing not needed " - "REPORTED LUNS DATA CHANGED UA " - "%p", ua); + list_for_each_entry(ua, &tgt_dev->UA_list, UA_list_entry) { + if (scst_analyze_sense(ua->UA_sense_buffer, ua->UA_valid_sense_len, + SCST_SENSE_ALL_VALID, + SCST_LOAD_SENSE(scst_sense_reported_luns_data_changed))) { + TRACE_DBG("Freeing not needed REPORTED LUNS DATA CHANGED UA %p", + ua); scst_tgt_dev_del_free_UA(tgt_dev, ua); break; } @@ -156,7 +153,7 @@ enum scst_exec_res scst_request_sense_local(struct scst_cmd *cmd) spin_unlock_bh(&tgt_dev->tgt_dev_lock); buf = kzalloc(size, GFP_KERNEL); - if (buf == NULL) + if (!buf) goto out_put_busy; rc = scst_set_pending_UA(cmd, buf, &size); @@ -188,37 +185,33 @@ enum scst_exec_res scst_request_sense_local(struct scst_cmd *cmd) if (((scst_sense_response_code(tgt_dev->tgt_dev_sense) == 0x70) || (scst_sense_response_code(tgt_dev->tgt_dev_sense) == 0x71)) && (cmd->cdb[1] & 1)) { - PRINT_WARNING("%s: Fixed format of the saved sense, but " - "descriptor format requested. Conversion will " - "truncated data", cmd->op_name); - PRINT_BUFFER("Original sense", tgt_dev->tgt_dev_sense, - tgt_dev->tgt_dev_valid_sense_len); + PRINT_WARNING("%s: Fixed format of the saved sense, but descriptor format requested. Conversion will truncated data", + cmd->op_name); + PRINT_BUFFER("Original sense", + tgt_dev->tgt_dev_sense, tgt_dev->tgt_dev_valid_sense_len); buffer_size = min(SCST_STANDARD_SENSE_LEN, buffer_size); - sl = scst_set_sense(buffer, buffer_size, true, - tgt_dev->tgt_dev_sense[2], tgt_dev->tgt_dev_sense[12], - tgt_dev->tgt_dev_sense[13]); + sl = scst_set_sense(buffer, buffer_size, true, tgt_dev->tgt_dev_sense[2], + tgt_dev->tgt_dev_sense[12], tgt_dev->tgt_dev_sense[13]); } else if (((scst_sense_response_code(tgt_dev->tgt_dev_sense) == 0x72) || (scst_sense_response_code(tgt_dev->tgt_dev_sense) == 0x73)) && !(cmd->cdb[1] & 1)) { - PRINT_WARNING("%s: Descriptor format of the " - "saved sense, but fixed format requested. Conversion " - "will truncate data", cmd->op_name); - PRINT_BUFFER("Original sense", tgt_dev->tgt_dev_sense, - tgt_dev->tgt_dev_valid_sense_len); + PRINT_WARNING("%s: Descriptor format of the saved sense, but fixed format requested. Conversion will truncate data", + cmd->op_name); + PRINT_BUFFER("Original sense", + tgt_dev->tgt_dev_sense, tgt_dev->tgt_dev_valid_sense_len); buffer_size = min(SCST_STANDARD_SENSE_LEN, buffer_size); - sl = scst_set_sense(buffer, buffer_size, false, - tgt_dev->tgt_dev_sense[1], tgt_dev->tgt_dev_sense[2], - tgt_dev->tgt_dev_sense[3]); + sl = scst_set_sense(buffer, buffer_size, false, tgt_dev->tgt_dev_sense[1], + tgt_dev->tgt_dev_sense[2], tgt_dev->tgt_dev_sense[3]); } else { - if (buffer_size >= tgt_dev->tgt_dev_valid_sense_len) + if (buffer_size >= tgt_dev->tgt_dev_valid_sense_len) { sl = tgt_dev->tgt_dev_valid_sense_len; - else { + } else { sl = buffer_size; - TRACE(TRACE_SCSI|TRACE_MINOR, "%s: Being returned sense " - "truncated to size %d (needed %d)", cmd->op_name, - buffer_size, tgt_dev->tgt_dev_valid_sense_len); + TRACE(TRACE_SCSI | TRACE_MINOR, + "%s: Being returned sense truncated to size %d (needed %d)", + cmd->op_name, buffer_size, tgt_dev->tgt_dev_valid_sense_len); } memcpy(buffer, tgt_dev->tgt_dev_sense, sl); } @@ -278,8 +271,7 @@ static enum scst_exec_res scst_report_tpgs(struct scst_cmd *cmd) scst_set_busy(cmd); goto out_put; } else if (res < 0) { - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_invalid_field_in_cdb)); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_field_in_cdb)); goto out_put; } @@ -308,11 +300,10 @@ static enum scst_exec_res scst_exec_set_tpgs(struct scst_cmd *cmd) int rc; if (!dev->expl_alua) { - PRINT_ERROR("SET TARGET PORT GROUPS: not explicit ALUA mode " - "(dev %s)", dev->virt_name); + PRINT_ERROR("SET TARGET PORT GROUPS: not explicit ALUA mode (dev %s)", + dev->virt_name); /* Invalid opcode, i.e. SA field */ - scst_set_invalid_field_in_cdb(cmd, 1, - 0 | SCST_INVAL_FIELD_BIT_OFFS_VALID); + scst_set_invalid_field_in_cdb(cmd, 1, 0 | SCST_INVAL_FIELD_BIT_OFFS_VALID); goto out; } @@ -347,9 +338,9 @@ static enum scst_exec_res scst_report_supported_tm_fns(struct scst_cmd *cmd) buf[0] = 0xF8; /* ATS, ATSS, CACAS, CTSS, LURS */ buf[1] = 0; - if ((cmd->cdb[2] & 0x80) == 0) + if ((cmd->cdb[2] & 0x80) == 0) { resp_len = 4; - else { + } else { buf[3] = 0x0C; #if 1 buf[4] = 1; /* TMFTMOV */ @@ -402,7 +393,7 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) goto out_compl; TRACE_DBG("cmd %p, options %d, req_opcode %x, req_sa %x, rctd %d", - cmd, options, req_opcode, req_sa, rctd); + cmd, options, req_opcode, req_sa, rctd); switch (options) { case 0: /* all */ @@ -419,13 +410,12 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) if (req_opcode == supp_opcodes[i]->od_opcode) { op = supp_opcodes[i]; if (op->od_serv_action_valid) { - TRACE(TRACE_MINOR, "Requested opcode %x " - "with unexpected service action " - "(dev %s, initiator %s)", - req_opcode, cmd->dev->virt_name, - cmd->sess->initiator_name); + TRACE(TRACE_MINOR, + "Requested opcode %x ith unexpected service action (dev %s, initiator %s)", + req_opcode, cmd->dev->virt_name, + cmd->sess->initiator_name); scst_set_invalid_field_in_cdb(cmd, 2, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); + SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); goto out_compl; } buf_len = 4 + op->od_cdb_size; @@ -434,10 +424,10 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) break; } } - if (op == NULL) { - TRACE(TRACE_MINOR, "Requested opcode %x not found " - "(dev %s, initiator %s)", req_opcode, - cmd->dev->virt_name, cmd->sess->initiator_name); + if (!op) { + TRACE(TRACE_MINOR, + "Requested opcode %x not found (dev %s, initiator %s)", + req_opcode, cmd->dev->virt_name, cmd->sess->initiator_name); buf_len = 4; } break; @@ -447,13 +437,12 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) if (req_opcode == supp_opcodes[i]->od_opcode) { op = supp_opcodes[i]; if (!op->od_serv_action_valid) { - TRACE(TRACE_MINOR, "Requested opcode %x " - "without expected service action " - "(dev %s, initiator %s)", - req_opcode, cmd->dev->virt_name, - cmd->sess->initiator_name); + TRACE(TRACE_MINOR, + "Requested opcode %x without expected service action (dev %s, initiator %s)", + req_opcode, cmd->dev->virt_name, + cmd->sess->initiator_name); scst_set_invalid_field_in_cdb(cmd, 2, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); + SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); goto out_compl; } if (req_sa != op->od_serv_action) { @@ -466,19 +455,17 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) break; } } - if (op == NULL) { - TRACE(TRACE_MINOR, "Requested opcode %x/%x not found " - "(dev %s, initiator %s)", req_opcode, req_sa, - cmd->dev->virt_name, cmd->sess->initiator_name); + if (!op) { + TRACE(TRACE_MINOR, + "Requested opcode %x/%x not found (dev %s, initiator %s)", + req_opcode, req_sa, cmd->dev->virt_name, cmd->sess->initiator_name); buf_len = 4; } break; default: - PRINT_ERROR("REPORT SUPPORTED OPERATION CODES: REPORTING OPTIONS " - "%x not supported (dev %s, initiator %s)", options, - cmd->dev->virt_name, cmd->sess->initiator_name); - scst_set_invalid_field_in_cdb(cmd, 2, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); + PRINT_ERROR("REPORT SUPPORTED OPERATION CODES: REPORTING OPTIONS %x not supported (dev %s, initiator %s)", + options, cmd->dev->virt_name, cmd->sess->initiator_name); + scst_set_invalid_field_in_cdb(cmd, 2, SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); goto out_compl; } @@ -492,9 +479,9 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) inline_buf = true; } else { buf = vmalloc(buf_len); /* it can be big */ - if (buf == NULL) { - PRINT_ERROR("Unable to allocate REPORT SUPPORTED " - "OPERATION CODES buffer with size %d", buf_len); + if (!buf) { + PRINT_ERROR("Unable to allocate REPORT SUPPORTED OPERATION CODES buffer with size %d", + buf_len); scst_set_busy(cmd); goto out_err_put; } @@ -528,7 +515,7 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) break; case 1: case 2: - if (op != NULL) { + if (op) { buf[1] |= op->od_support; put_unaligned_be16(op->od_cdb_size, &buf[2]); memcpy(&buf[4], op->od_cdb_usage_bits, op->od_cdb_size); @@ -558,7 +545,7 @@ static enum scst_exec_res scst_report_supported_opcodes(struct scst_cmd *cmd) scst_set_resp_data_len(cmd, length); out_compl: - if ((supp_opcodes != NULL) && (cmd->devt->put_supported_opcodes != NULL)) + if (supp_opcodes && cmd->devt->put_supported_opcodes) cmd->devt->put_supported_opcodes(cmd, supp_opcodes, supp_opcodes_cnt); cmd->completed = 1; @@ -624,18 +611,16 @@ enum scst_exec_res scst_reserve_local(struct scst_cmd *cmd) TRACE_ENTRY(); if (cmd->sess->sess_mq) { - PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), " - "reservations not supported", cmd->sess, - cmd->sess->initiator_name, cmd->sess->tgt->tgt_name); + PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), reservations not supported", + cmd->sess, cmd->sess->initiator_name, cmd->sess->tgt->tgt_name); scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } - if ((cmd->cdb[0] == RESERVE_10) && (cmd->cdb[2] & SCST_RES_3RDPTY)) { - PRINT_ERROR("RESERVE_10: 3rdPty RESERVE not implemented " - "(lun=%lld)", (unsigned long long)cmd->lun); - scst_set_invalid_field_in_cdb(cmd, 2, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 4); + if (cmd->cdb[0] == RESERVE_10 && (cmd->cdb[2] & SCST_RES_3RDPTY)) { + PRINT_ERROR("RESERVE_10: 3rdPty RESERVE not implemented (lun=%lld)", + (unsigned long long)cmd->lun); + scst_set_invalid_field_in_cdb(cmd, 2, SCST_INVAL_FIELD_BIT_OFFS_VALID | 4); goto out_done; } @@ -661,11 +646,9 @@ enum scst_exec_res scst_reserve_local(struct scst_cmd *cmd) if (!list_empty(&dev->dev_registrants_list)) { if (scst_pr_crh_case(cmd)) goto out_completed; - else { - scst_set_cmd_error_status(cmd, - SAM_STAT_RESERVATION_CONFLICT); - goto out_done; - } + + scst_set_cmd_error_status(cmd, SAM_STAT_RESERVATION_CONFLICT); + goto out_done; } scst_res_lock(dev, &pr_lksb); @@ -700,9 +683,8 @@ enum scst_exec_res scst_release_local(struct scst_cmd *cmd) TRACE_ENTRY(); if (cmd->sess->sess_mq) { - PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), " - "reservations not supported", cmd->sess, - cmd->sess->initiator_name, cmd->sess->tgt->tgt_name); + PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), reservations not supported", + cmd->sess, cmd->sess->initiator_name, cmd->sess->tgt->tgt_name); scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } @@ -717,11 +699,9 @@ enum scst_exec_res scst_release_local(struct scst_cmd *cmd) if (!list_empty(&dev->dev_registrants_list)) { if (scst_pr_crh_case(cmd)) goto out_completed; - else { - scst_set_cmd_error_status(cmd, - SAM_STAT_RESERVATION_CONFLICT); - goto out_done; - } + + scst_set_cmd_error_status(cmd, SAM_STAT_RESERVATION_CONFLICT); + goto out_done; } scst_res_lock(dev, &pr_lksb); @@ -785,35 +765,30 @@ enum scst_exec_res scst_persistent_reserve_in_local(struct scst_cmd *cmd) session = cmd->sess; if (session->sess_mq) { - PRINT_WARNING_ONCE("MQ session %p from initiator %s (tgt %s), " - "persistent reservations not supported", session, - session->initiator_name, session->tgt->tgt_name); + PRINT_WARNING_ONCE("MQ session %p from initiator %s (tgt %s), persistent reservations not supported", + session, session->initiator_name, session->tgt->tgt_name); scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } if (unlikely(dev->not_pr_supporting_tgt_devs_num != 0)) { - PRINT_WARNING("Persistent Reservation command %s refused for " - "device %s, because the device has not supporting PR " - "transports connected", scst_get_opcode_name(cmd), - dev->virt_name); - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_invalid_opcode)); + PRINT_WARNING("Persistent Reservation command %s refused for device %s, because the device has not supporting PR transports connected", + scst_get_opcode_name(cmd), dev->virt_name); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } if (scst_dev_reserved(dev)) { - TRACE_PR("PR command rejected, because device %s holds regular " - "reservation", dev->virt_name); + TRACE_PR("PR command rejected, because device %s holds regular reservation", + dev->virt_name); scst_set_cmd_error_status(cmd, SAM_STAT_RESERVATION_CONFLICT); goto out_done; } if (cmd->tgt->tgt_forward_src && dev->scsi_dev && !dev->cluster_mode) { - PRINT_WARNING("PR commands for pass-through devices not " - "supported (device %s)", dev->virt_name); - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_invalid_opcode)); + PRINT_WARNING("PR commands for pass-through devices not supported (device %s)", + dev->virt_name); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } @@ -832,7 +807,7 @@ enum scst_exec_res scst_persistent_reserve_in_local(struct scst_cmd *cmd) action = cmd->cdb[1] & 0x1f; TRACE(TRACE_SCSI, "PR IN action %x for '%s' (LUN %llx) from '%s'", - action, dev->virt_name, tgt_dev->lun, session->initiator_name); + action, dev->virt_name, tgt_dev->lun, session->initiator_name); switch (action) { case PR_READ_KEYS: @@ -867,8 +842,7 @@ out_done: return SCST_EXEC_COMPLETED; out_unsup_act: - scst_set_invalid_field_in_cdb(cmd, 1, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); + scst_set_invalid_field_in_cdb(cmd, 1, SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); goto out_complete; } @@ -894,18 +868,15 @@ enum scst_exec_res scst_persistent_reserve_out_local(struct scst_cmd *cmd) session = cmd->sess; if (session->sess_mq) { - PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), " - "persistent reservations not supported", session, - session->initiator_name, session->tgt->tgt_name); + PRINT_WARNING_ONCE("MQ session (%p) from initiator %s (tgt %s), persistent reservations not supported", + session, session->initiator_name, session->tgt->tgt_name); scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } if (unlikely(dev->not_pr_supporting_tgt_devs_num != 0)) { - PRINT_WARNING("Persistent Reservation command %s refused for " - "device %s, because the device has not supporting PR " - "transports connected", scst_get_opcode_name(cmd), - dev->virt_name); + PRINT_WARNING("Persistent Reservation command %s refused for device %s, because the device has not supporting PR transports connected", + scst_get_opcode_name(cmd), dev->virt_name); scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_invalid_opcode)); goto out_done; } @@ -913,11 +884,11 @@ enum scst_exec_res scst_persistent_reserve_out_local(struct scst_cmd *cmd) action = cmd->cdb[1] & 0x1f; TRACE(TRACE_SCSI, "PR OUT action %x for '%s' (LUN %llx) from '%s'", - action, dev->virt_name, tgt_dev->lun, session->initiator_name); + action, dev->virt_name, tgt_dev->lun, session->initiator_name); if (scst_dev_reserved(dev)) { - TRACE_PR("PR command rejected, because device %s holds regular " - "reservation", dev->virt_name); + TRACE_PR("PR command rejected, because device %s holds regular reservation", + dev->virt_name); scst_set_cmd_error_status(cmd, SAM_STAT_RESERVATION_CONFLICT); goto out_done; } @@ -935,37 +906,34 @@ enum scst_exec_res scst_persistent_reserve_out_local(struct scst_cmd *cmd) * REGISTER AND MOVE and RESERVE will be additionally checked for * conflicts later. */ - if ((action != PR_REGISTER) && (action != PR_REGISTER_AND_IGNORE) && - (tgt_dev->registrant == NULL)) { + if (action != PR_REGISTER && action != PR_REGISTER_AND_IGNORE && + !tgt_dev->registrant) { TRACE_PR("'%s' not registered", cmd->sess->initiator_name); scst_set_cmd_error_status(cmd, SAM_STAT_RESERVATION_CONFLICT); goto out_unlock; } /* Check scope */ - if ((action != PR_REGISTER) && (action != PR_REGISTER_AND_IGNORE) && - (action != PR_CLEAR) && (cmd->cdb[2] >> 4) != SCOPE_LU) { + if (action != PR_REGISTER && action != PR_REGISTER_AND_IGNORE && + action != PR_CLEAR && (cmd->cdb[2] >> 4) != SCOPE_LU) { TRACE_PR("Scope must be SCOPE_LU for action %x", action); - scst_set_invalid_field_in_cdb(cmd, 2, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 4); + scst_set_invalid_field_in_cdb(cmd, 2, SCST_INVAL_FIELD_BIT_OFFS_VALID | 4); goto out_unlock; } /* Check SPEC_I_PT (PR_REGISTER_AND_MOVE has another format) */ - if ((action != PR_REGISTER) && (action != PR_REGISTER_AND_MOVE) && + if (action != PR_REGISTER && action != PR_REGISTER_AND_MOVE && ((buffer[20] >> 3) & 0x01)) { TRACE_PR("SPEC_I_PT must be zero for action %x", action); - scst_set_invalid_field_in_parm_list(cmd, 20, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 3); + scst_set_invalid_field_in_parm_list(cmd, 20, SCST_INVAL_FIELD_BIT_OFFS_VALID | 3); goto out_unlock; } /* Check ALL_TG_PT (PR_REGISTER_AND_MOVE has another format) */ - if ((action != PR_REGISTER) && (action != PR_REGISTER_AND_IGNORE) && - (action != PR_REGISTER_AND_MOVE) && ((buffer[20] >> 2) & 0x01)) { + if (action != PR_REGISTER && action != PR_REGISTER_AND_IGNORE && + action != PR_REGISTER_AND_MOVE && ((buffer[20] >> 2) & 0x01)) { TRACE_PR("ALL_TG_PT must be zero for action %x", action); - scst_set_invalid_field_in_parm_list(cmd, 20, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 2); + scst_set_invalid_field_in_parm_list(cmd, 20, SCST_INVAL_FIELD_BIT_OFFS_VALID | 2); goto out_unlock; } @@ -1002,16 +970,15 @@ enum scst_exec_res scst_persistent_reserve_out_local(struct scst_cmd *cmd) scst_pr_register_and_move(cmd, buffer, buffer_size); break; default: - scst_set_invalid_field_in_cdb(cmd, 1, - SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); + scst_set_invalid_field_in_cdb(cmd, 1, SCST_INVAL_FIELD_BIT_OFFS_VALID | 0); goto out_unlock; } if (cmd->status == SAM_STAT_GOOD) scst_pr_sync_device_file(dev); - if ((cmd->devt->pr_cmds_notifications) && - (cmd->status == SAM_STAT_GOOD)) /* sync file may change status */ + /* sync file may change status */ + if (cmd->devt->pr_cmds_notifications && cmd->status == SAM_STAT_GOOD) res = SCST_EXEC_NOT_COMPLETED; out_unlock: @@ -1023,8 +990,7 @@ out_done: if (res == SCST_EXEC_COMPLETED) { if (!aborted) cmd->completed = 1; - cmd->scst_cmd_done(cmd, SCST_CMD_STATE_DEFAULT, - SCST_CONTEXT_SAME); + cmd->scst_cmd_done(cmd, SCST_CMD_STATE_DEFAULT, SCST_CONTEXT_SAME); } TRACE_EXIT_RES(res); |
|
From: Gleb C. <lna...@ya...> - 2025-10-21 09:19:09
|
Commit: 6ca7f49 GitHub URL: https://github.com/SCST-project/scst/commit/6ca7f49b8cd30fe52b8769e084ef6ba3fcdba25b Author: Gleb Chesnokov Date: 2025-10-21T12:18:36+03:00 Log Message: ----------- scst_tg: Fix multiple checkpatch warnings This patch does not change any functionality. Modified Paths: -------------- scst/src/scst_tg.c | 136 +++++++-------- 1 file changed, 59 insertions(+), 77 deletions(-) =================================================================== diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index f2415b0..e69899d 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -426,15 +426,13 @@ static void scst_alua_transitioning_work_fn(struct work_struct *work) TRACE_DBG("Retrying transitioning cmd %p", cmd); spin_lock_irq(&cmd->cmd_threads->cmd_list_lock); - list_add(&cmd->cmd_list_entry, - &cmd->cmd_threads->active_cmd_list); + list_add(&cmd->cmd_list_entry, &cmd->cmd_threads->active_cmd_list); wake_up(&cmd->cmd_threads->cmd_list_waitQ); spin_unlock_irq(&cmd->cmd_threads->cmd_list_lock); kfree(retry); TRACE_EXIT(); - return; } /* @@ -471,19 +469,17 @@ static int scst_tg_accept_transitioning(struct scst_cmd *cmd) break; } - if (cmd->already_transitioning) + if (cmd->already_transitioning) { TRACE_DBG("cmd %p already transitioned checked, failing", cmd); - else { + } else { struct scst_alua_retry *retry; TRACE_DBG("ALUA transitioning: delaying cmd %p", cmd); retry = kzalloc(sizeof(*retry), GFP_KERNEL); - if (retry == NULL) { - TRACE_DBG("Unable to allocate ALUA retry " - "struct, failing cmd %p", cmd); - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_alua_transitioning)); + if (!retry) { + TRACE_DBG("Unable to allocate ALUA retry struct, failing cmd %p", cmd); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_alua_transitioning)); res = SCST_ALUA_CHECK_ERROR; goto out; } @@ -493,13 +489,12 @@ static int scst_tg_accept_transitioning(struct scst_cmd *cmd) INIT_DELAYED_WORK(&retry->alua_retry_work, scst_alua_transitioning_work_fn); cmd->already_transitioning = 1; - schedule_delayed_work(&retry->alua_retry_work, HZ/2); + schedule_delayed_work(&retry->alua_retry_work, HZ / 2); res = SCST_ALUA_CHECK_DELAYED; goto out; } - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_alua_transitioning)); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_alua_transitioning)); res = SCST_ALUA_CHECK_ERROR; out: @@ -548,16 +543,14 @@ static void scst_check_alua_invariant(void) SCST_TG_STATE_OPTIMIZED; if (tgt_dev->alua_filter != scst_alua_filter[expected_state]) { - PRINT_ERROR("LUN %s/%s/%s/%lld/%s: ALUA filter" - " %p <> %p", - tgt_dev->acg_dev->acg->tgt->tgt_name, - tgt_dev->acg_dev->acg->acg_name ? : - "(default)", - tgt_dev->sess->initiator_name, - tgt_dev->lun, - tgt_dev->dev->virt_name ? : "(null)", - tgt_dev->alua_filter, - scst_alua_filter[expected_state]); + PRINT_ERROR("LUN %s/%s/%s/%lld/%s: ALUA filter %p <> %p", + tgt_dev->acg_dev->acg->tgt->tgt_name, + tgt_dev->acg_dev->acg->acg_name ?: "(default)", + tgt_dev->sess->initiator_name, + tgt_dev->lun, + tgt_dev->dev->virt_name ?: "(null)", + tgt_dev->alua_filter, + scst_alua_filter[expected_state]); } } } @@ -580,12 +573,11 @@ static void scst_tg_change_tgt_dev_state(struct scst_tgt_dev *tgt_dev, lockdep_assert_held(&scst_dg_mutex); TRACE_MGMT_DBG("ALUA state of tgt_dev %p has changed (gen_ua %d)", - tgt_dev, gen_ua); + tgt_dev, gen_ua); scst_update_tgt_dev_alua_filter(tgt_dev, state); if (gen_ua) - scst_gen_aen_or_ua(tgt_dev, - SCST_LOAD_SENSE(scst_sense_asym_access_state_changed)); + scst_gen_aen_or_ua(tgt_dev, SCST_LOAD_SENSE(scst_sense_asym_access_state_changed)); } /* Initialize ALUA state of LUN tgt_dev */ @@ -646,8 +638,7 @@ static void scst_reset_tgt_alua_filter(struct scst_target_group *tg, list_for_each_entry(tgt_dev, &dgd->dev->dev_tgt_dev_list, dev_tgt_dev_list_entry) { if (tgt_dev->acg_dev->acg->tgt == tgt) - scst_update_tgt_dev_alua_filter(tgt_dev, - SCST_TG_STATE_OPTIMIZED); + scst_update_tgt_dev_alua_filter(tgt_dev, SCST_TG_STATE_OPTIMIZED); } } @@ -882,9 +873,8 @@ static void scst_event_stpg_notify_fn(struct scst_event *event, TRACE_ENTRY(); - PRINT_INFO("Notification for event %u (id %d) received " - "with status %d (priv %p)", event->event_code, - event->event_id, status, priv); + PRINT_INFO("Notification for event %u (id %d) received with status %d (priv %p)", + event->event_code, event->event_id, status, priv); mutex_lock(&scst_mutex); mutex_lock(&scst_dg_mutex); @@ -892,14 +882,14 @@ static void scst_event_stpg_notify_fn(struct scst_event *event, dg = __lookup_dg_by_dev(cmd->dev); if (!dg) { PRINT_ERROR("STPG: unable to find DG for device %s", - cmd->dev->virt_name); + cmd->dev->virt_name); goto out_fail; } list_for_each_entry(dgd, &dg->dev_list, entry) { if (dgd->dev->stpg_ext_blocked) { TRACE_DBG("STPG: ext unblocking dev %s", - dgd->dev->virt_name); + dgd->dev->virt_name); scst_ext_unblock_dev(dgd->dev, true); dgd->dev->stpg_ext_blocked = 0; } @@ -910,7 +900,7 @@ static void scst_event_stpg_notify_fn(struct scst_event *event, if (status != 0) { PRINT_ERROR("on_stpg script for device group %s failed with status %d", - dg->name, status); + dg->name, status); goto out_fail; } @@ -921,9 +911,8 @@ static void scst_event_stpg_notify_fn(struct scst_event *event, PRINT_ERROR("STPG: unable to find TG %d", d->group_id); goto out_fail; } else if (tg->state == scst_alua_name_to_state(d->prev_state)) { - PRINT_ERROR("on_stpg script did not change ALUA state" - " for device group %s / target group %s", - dg->name, tg->name); + PRINT_ERROR("on_stpg script did not change ALUA state for device group %s / target group %s", + dg->name, tg->name); goto out_fail; } } @@ -953,9 +942,8 @@ out_fail: * @invoke_callbacks: Whether or not to invoke the on_alua_state_changed_* * callback functions. */ -static void __scst_tgt_set_state(struct scst_target_group *tg, - struct scst_tgt_dev *tgt_dev, enum scst_tg_state state, - bool invoke_callbacks) +static void __scst_tgt_set_state(struct scst_target_group *tg, struct scst_tgt_dev *tgt_dev, + enum scst_tg_state state, bool invoke_callbacks) { bool gen_ua = state != SCST_TG_STATE_TRANSITIONING; struct scst_tgt *tgt = tgt_dev->sess->tgt; @@ -1102,7 +1090,7 @@ static void __scst_gen_alua_state_changed_ua(struct scst_target_group *tg) tgt = tgt_dev->sess->tgt; if (__scst_tg_have_tgt(tg, tgt)) scst_gen_aen_or_ua(tgt_dev, - SCST_LOAD_SENSE(scst_sense_asym_access_state_changed)); + SCST_LOAD_SENSE(scst_sense_asym_access_state_changed)); } } } @@ -1127,8 +1115,7 @@ static void __scst_tg_set_preferred(struct scst_target_group *tg, __scst_gen_alua_state_changed_ua(tg); } -int scst_tg_set_preferred(struct scst_target_group *tg, - bool preferred) +int scst_tg_set_preferred(struct scst_target_group *tg, bool preferred) { int res; @@ -1235,8 +1222,8 @@ static void __scst_dg_dev_remove(struct scst_dev_group *dg, struct scst_dg_dev *dgdev) { if (dgdev->dev->stpg_ext_blocked) { - TRACE_DBG("DG %s remove: unblocking STPG ext blocked " - "dev %s", dg->name, dgdev->dev->virt_name); + TRACE_DBG("DG %s remove: unblocking STPG ext blocked dev %s", + dg->name, dgdev->dev->virt_name); scst_ext_unblock_dev(dgdev->dev, true); dgdev->dev->stpg_ext_blocked = 0; } @@ -1430,7 +1417,6 @@ struct scst_dev_group *scst_lookup_dg_by_dev(struct scst_device *dev) return __lookup_dg_by_dev(dev); } - /* * Target group module management. */ @@ -1534,7 +1520,7 @@ bool scst_alua_configured(struct scst_device *dev) dg = __lookup_dg_by_dev(dev); mutex_unlock(&scst_dg_mutex); - return dg != NULL; + return dg; } EXPORT_SYMBOL_GPL(scst_alua_configured); @@ -1671,21 +1657,19 @@ static void scst_stpg_check_blocking_done(struct scst_stpg_wait *wait) if (atomic_dec_and_test(&wait->stpg_wait_left)) { if (wait->status == 0) scst_event_queue(SCST_EVENT_STPG_USER_INVOKE, - SCST_EVENT_SCST_CORE_ISSUER, wait->event_entry); - else { + SCST_EVENT_SCST_CORE_ISSUER, wait->event_entry); + else wait->event_entry->event_notify_fn(&wait->event_entry->event, - wait->event_entry->notify_fn_priv, wait->status); - } + wait->event_entry->notify_fn_priv, + wait->status); kfree(wait); } TRACE_EXIT(); - return; } /* No locks */ -static void scst_stpg_ext_blocking_done(struct scst_device *dev, - uint8_t *data, int len) +static void scst_stpg_ext_blocking_done(struct scst_device *dev, uint8_t *data, int len) { sBUG_ON(len != sizeof(data)); scst_stpg_check_blocking_done(*((struct scst_stpg_wait **)data)); @@ -1723,15 +1707,16 @@ static int scst_emit_stpg_event(struct scst_cmd *cmd, struct scst_dev_group *dg, payload_len = sizeof(*payload) + sizeof(*descr) * tpg_desc_count; event_entry_len = sizeof(*event_entry) + payload_len; + event_entry = kzalloc(event_entry_len, GFP_KERNEL); - if (event_entry == NULL) { + if (!event_entry) { PRINT_ERROR("Unable to allocate event (size %d)", event_entry_len); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event = &event_entry->event; event->payload_len = payload_len; @@ -1741,8 +1726,7 @@ static int scst_emit_stpg_event(struct scst_cmd *cmd, struct scst_dev_group *dg, res = 1; - if (strscpy(payload->device_name, dev->virt_name, - sizeof(payload->device_name)) < 0) { + if (strscpy(payload->device_name, dev->virt_name, sizeof(payload->device_name)) < 0) { PRINT_ERROR("Device name %s too long", dev->virt_name); goto out_too_long; } @@ -1786,16 +1770,16 @@ static int scst_emit_stpg_event(struct scst_cmd *cmd, struct scst_dev_group *dg, dg->stpg_rel_tgt_id = cmd->tgt->rel_tgt_id; dg->stpg_transport_id = kmemdup(cmd->sess->transport_id, - scst_tid_size(cmd->sess->transport_id), GFP_KERNEL); - if (dg->stpg_transport_id == NULL) { + scst_tid_size(cmd->sess->transport_id), GFP_KERNEL); + if (!dg->stpg_transport_id) { PRINT_ERROR("Unable to duplicate stpg_transport_id"); goto out; } wait = kzalloc(sizeof(*wait), GFP_KERNEL); - if (wait == NULL) { - PRINT_ERROR("Unable to allocate STPG wait struct " - "(size %zd)", sizeof(*wait)); + if (!wait) { + PRINT_ERROR("Unable to allocate STPG wait struct (size %zd)", + sizeof(*wait)); res = -ENOMEM; goto out; } @@ -1822,8 +1806,8 @@ static int scst_emit_stpg_event(struct scst_cmd *cmd, struct scst_dev_group *dg, scst_stpg_ext_blocking_done, &wait, sizeof(wait), true); if (rc != 0) { - TRACE_DBG("scst_ext_block_dev() failed " - "with %d, reverting (cmd %p)", rc, cmd); + TRACE_DBG("scst_ext_block_dev() failed with %d, reverting (cmd %p)", + rc, cmd); wait->status = rc; wait->dg = dg; atomic_dec(&wait->stpg_wait_left); @@ -1897,7 +1881,7 @@ int scst_tg_set_group_info(struct scst_cmd *cmd) /* Check for some reasonable limit */ if (tpg_desc_count > 64) { PRINT_ERROR("Too many STPG descriptors (%d) for dev %s", - tpg_desc_count, dev->virt_name); + tpg_desc_count, dev->virt_name); res = -EINVAL; scst_set_invalid_field_in_cdb(cmd, 6, 0); goto out_put; @@ -1914,16 +1898,16 @@ int scst_tg_set_group_info(struct scst_cmd *cmd) res = mutex_lock_interruptible(&scst_mutex); if (res) { - PRINT_INFO("mutex_lock_interruptible() returned %d, finishing " - "cmd %p", res, cmd); + PRINT_INFO("mutex_lock_interruptible() returned %d, finishing cmd %p", + res, cmd); scst_set_busy(cmd); goto out_put; } res = mutex_lock_interruptible(&scst_dg_mutex); if (res) { - PRINT_INFO("mutex_lock_interruptible() returned %d, finishing " - "cmd %p", res, cmd); + PRINT_INFO("mutex_lock_interruptible() returned %d, finishing cmd %p", + res, cmd); scst_set_busy(cmd); goto out_unlock_sm_fail; } @@ -1978,15 +1962,14 @@ int scst_tg_set_group_info(struct scst_cmd *cmd) if (osi[j].tg->state == SCST_TG_STATE_TRANSITIONING) { TRACE_MGMT_DBG("TG %p is transitioning", osi[j].tg); res = -EBUSY; - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_alua_transitioning)); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_alua_transitioning)); /* second sense will not override the set one */ goto out_unlock_fail; } osi[j].prev_state = osi[j].tg->state; - TRACE_DBG("j %d, group_id %u, tg %s (%p), state %d", j, osi[j].group_id, - osi[j].tg->name, osi[j].tg, osi[j].tg->state); + TRACE_DBG("j %d, group_id %u, tg %s (%p), state %d", + j, osi[j].group_id, osi[j].tg->name, osi[j].tg, osi[j].tg->state); } mutex_unlock(&scst_dg_mutex); @@ -2006,8 +1989,7 @@ int scst_tg_set_group_info(struct scst_cmd *cmd) WARN_ONCE(true, "res = %d\n", res); fallthrough; case -EOVERFLOW: - scst_set_cmd_error(cmd, - SCST_LOAD_SENSE(scst_sense_set_target_pgs_failed)); + scst_set_cmd_error(cmd, SCST_LOAD_SENSE(scst_sense_set_target_pgs_failed)); break; } |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:15:52
|
Commit: 6543c4c GitHub URL: https://github.com/SCST-project/scst/commit/6543c4c316ebe03e6afa5235544df78c26643c14 Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- qla2x00t-32gbit: Remove firmware URL The historic QLogic firmware URL redirects to a Marvell page that only provides drivers. Refer to linux-firmware instead. Cc: Nilesh Javali <nj...@ma...> Cc: James E.J. Bottomley <Jam...@Ha...> Cc: Martin K. Petersen <mar...@or...> Cc: QLOGIC ML <GR-...@ma...> Cc: LINUX SCSI ML <lin...@vg...> Signed-off-by: Xose Vazquez Perez <xos...@gm...> Link: https://lore.kernel.org/r/202...@gm... Signed-off-by: Martin K. Petersen <mar...@or...> [ commit b152f199fa43 upstream ] Modified Paths: -------------- qla2x00t-32gbit/Kconfig | 6 +----- qla2x00t-32gbit/qla_init.c | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/Kconfig b/qla2x00t-32gbit/Kconfig index f82ae0b..2b047bb 100644 --- a/qla2x00t-32gbit/Kconfig +++ b/qla2x00t-32gbit/Kconfig @@ -25,11 +25,7 @@ config SCSI_QLA_FC Upon request, the driver caches the firmware image until the driver is unloaded. - Firmware images can be retrieved from: - - http://ldriver.qlogic.com/firmware/ - - They are also included in the linux-firmware tree as well. + Firmware images are included in the linux-firmware tree. config SCSI_QLA2XXX_TARGET bool "QLogic 2xxx target mode support" diff --git a/qla2x00t-32gbit/qla_init.c b/qla2x00t-32gbit/qla_init.c index 950b72f..4799315 100644 --- a/qla2x00t-32gbit/qla_init.c +++ b/qla2x00t-32gbit/qla_init.c @@ -8606,8 +8606,6 @@ failed: return QLA_SUCCESS; } -#define QLA_FW_URL "http://ldriver.qlogic.com/firmware/" - int qla2x00_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) { @@ -8625,8 +8623,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr) if (!blob) { ql_log(ql_log_info, vha, 0x0083, "Firmware image unavailable.\n"); - ql_log(ql_log_info, vha, 0x0084, - "Firmware images can be retrieved from: "QLA_FW_URL ".\n"); return QLA_FUNCTION_FAILED; } |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:15:41
|
Commit: 0e890f5 GitHub URL: https://github.com/SCST-project/scst/commit/0e890f51676e4ccfe0660d3dc62b37f72f0546de Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- scst: Indent Kconfig help text Fix indentation of config option's help text by adding leading spaces. Generally help text is indented by couple of spaces more beyond the leading tab <\t> character. It helps Kconfig parsers to read file without error. Modified Paths: -------------- qla2x00t-32gbit/Kconfig | 44 +++++++-------- qla2x00t/Kconfig | 40 ++++++------- srpt/src/Kconfig | 14 ++--- 3 files changed, 49 insertions(+), 49 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/Kconfig b/qla2x00t-32gbit/Kconfig index 133a47a..f82ae0b 100644 --- a/qla2x00t-32gbit/Kconfig +++ b/qla2x00t-32gbit/Kconfig @@ -7,44 +7,44 @@ config SCSI_QLA_FC select FW_LOADER select BTREE help - This qla2xxx driver supports all QLogic Fibre Channel - PCI and PCIe host adapters. + This qla2xxx driver supports all QLogic Fibre Channel + PCI and PCIe host adapters. - By default, firmware for the ISP parts will be loaded - via the Firmware Loader interface. + By default, firmware for the ISP parts will be loaded + via the Firmware Loader interface. - ISP Firmware Filename - ---------- ----------------- - 21xx ql2100_fw.bin - 22xx ql2200_fw.bin - 2300, 2312, 6312 ql2300_fw.bin - 2322, 6322 ql2322_fw.bin - 24xx, 54xx ql2400_fw.bin - 25xx ql2500_fw.bin + ISP Firmware Filename + ---------- ----------------- + 21xx ql2100_fw.bin + 22xx ql2200_fw.bin + 2300, 2312, 6312 ql2300_fw.bin + 2322, 6322 ql2322_fw.bin + 24xx, 54xx ql2400_fw.bin + 25xx ql2500_fw.bin - Upon request, the driver caches the firmware image until - the driver is unloaded. + Upon request, the driver caches the firmware image until + the driver is unloaded. - Firmware images can be retrieved from: + Firmware images can be retrieved from: - http://ldriver.qlogic.com/firmware/ + http://ldriver.qlogic.com/firmware/ - They are also included in the linux-firmware tree as well. + They are also included in the linux-firmware tree as well. config SCSI_QLA2XXX_TARGET bool "QLogic 2xxx target mode support" depends on SCSI_QLA_FC default y help - This option enables target mode hooks used by the SCST qla2x00t - driver. Once qla2x00tgt module is loaded, target mode for each - port can be enable via sysfs interface. + This option enables target mode hooks used by the SCST qla2x00t + driver. Once qla2x00tgt module is loaded, target mode for each + port can be enable via sysfs interface. - You will also need the SCST middle level for qla2x00t. + You will also need the SCST middle level for qla2x00t. config SCST_QLA_TGT_ADDON tristate "QLogic SCST Target Driver" depends on SCSI_QLA2XXX_TARGET default y help - SCST QLogic 32 gbit/s target driver. + SCST QLogic 32 gbit/s target driver. diff --git a/qla2x00t/Kconfig b/qla2x00t/Kconfig index 12edf3c..2c22878 100644 --- a/qla2x00t/Kconfig +++ b/qla2x00t/Kconfig @@ -4,38 +4,38 @@ config SCSI_QLA_FC select SCSI_FC_ATTRS select FW_LOADER help - This qla2xxx driver supports all QLogic Fibre Channel - PCI and PCIe host adapters. + This qla2xxx driver supports all QLogic Fibre Channel + PCI and PCIe host adapters. - By default, firmware for the ISP parts will be loaded - via the Firmware Loader interface. + By default, firmware for the ISP parts will be loaded + via the Firmware Loader interface. - ISP Firmware Filename - ---------- ----------------- - 21xx ql2100_fw.bin - 22xx ql2200_fw.bin - 2300, 2312, 6312 ql2300_fw.bin - 2322, 6322 ql2322_fw.bin - 24xx, 54xx ql2400_fw.bin - 25xx ql2500_fw.bin + ISP Firmware Filename + ---------- ----------------- + 21xx ql2100_fw.bin + 22xx ql2200_fw.bin + 2300, 2312, 6312 ql2300_fw.bin + 2322, 6322 ql2322_fw.bin + 24xx, 54xx ql2400_fw.bin + 25xx ql2500_fw.bin - Upon request, the driver caches the firmware image until - the driver is unloaded. + Upon request, the driver caches the firmware image until + the driver is unloaded. - Firmware images can be retrieved from: + Firmware images can be retrieved from: - http://ldriver.qlogic.com/firmware/ + http://ldriver.qlogic.com/firmware/ config SCSI_QLA2XXX_TARGET bool "QLogic 2xxx target mode support" depends on SCSI_QLA_FC default y help - This option enables target mode hooks used by the SCST qla2x00t - driver. Once qla2x00tgt module is loaded, target mode for each - port can be enable via sysfs interface. + This option enables target mode hooks used by the SCST qla2x00t + driver. Once qla2x00tgt module is loaded, target mode for each + port can be enable via sysfs interface. - You will also need the SCST middle level for qla2x00t. + You will also need the SCST middle level for qla2x00t. config SCST_QLA_TGT_ADDON tristate "QLogic 2XXX Target Mode Add-On" diff --git a/srpt/src/Kconfig b/srpt/src/Kconfig index d580ec0..7746759 100644 --- a/srpt/src/Kconfig +++ b/srpt/src/Kconfig @@ -2,10 +2,10 @@ config SCST_SRPT tristate "InfiniBand SCSI RDMA Protocol target support" depends on INFINIBAND && SCST help - Support for the SCSI RDMA Protocol (SRP) Target driver. The - SRP protocol is a protocol that allows an initiator to access - a block storage device on another host (target) over a network - that supports the RDMA protocol. Currently the RDMA protocol is - supported by InfiniBand and by iWarp network hardware. More - information about the SRP protocol can be found on the website - of the INCITS T10 technical committee (http://www.t10.org/). + Support for the SCSI RDMA Protocol (SRP) Target driver. The + SRP protocol is a protocol that allows an initiator to access + a block storage device on another host (target) over a network + that supports the RDMA protocol. Currently the RDMA protocol is + supported by InfiniBand and by iWarp network hardware. More + information about the SRP protocol can be found on the website + of the INCITS T10 technical committee (http://www.t10.org/). |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:15:17
|
Commit: 2c69fe0 GitHub URL: https://github.com/SCST-project/scst/commit/2c69fe018cc19328ae365d9e4198ae0aff5b0cc2 Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- scst: Use block layer helpers to calculate num of queues The calculation of the upper limit for queues does not depend solely on the number of online CPUs; for example, the isolcpus kernel command-line option must also be considered. To account for this, the block layer provides a helper function to retrieve the maximum number of queues. Use it to set an appropriate upper queue number limit. Modified Paths: -------------- iscsi-scst/kernel/iscsi.c | 2 +- iscsi-scst/kernel/isert-scst/iser_rdma.c | 3 +-- qla2x00t-32gbit/qla_isr.c | 10 +++---- qla2x00t/qla_os.c | 4 +-- scst/include/backport.h | 21 +++++++++++++++ scst/src/scst_main.c | 12 ++++----- scst_local/scst_local.c | 2 +- 7 files changed, 37 insertions(+), 17 deletions(-) =================================================================== diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 1e0d11f..dd3d497 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -4108,7 +4108,7 @@ create: if (dedicated) { count = 1; } else if (!cpu_mask) { - count = max_t(int, num_online_cpus(), 2); + count = blk_mq_num_online_queues(2); } else { count = 0; for_each_cpu(i, cpu_mask) diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 3971106..6ed53bc 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -922,8 +922,7 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) isert_dev->device_attr = ib_dev->attrs; #endif - isert_dev->num_cqs = min_t(int, num_online_cpus(), - ib_dev->num_comp_vectors); + isert_dev->num_cqs = blk_mq_num_online_queues(ib_dev->num_comp_vectors); isert_dev->cq_qps = kcalloc(isert_dev->num_cqs, sizeof(*isert_dev->cq_qps), diff --git a/qla2x00t-32gbit/qla_isr.c b/qla2x00t-32gbit/qla_isr.c index 913152b..7f2eb9c 100644 --- a/qla2x00t-32gbit/qla_isr.c +++ b/qla2x00t-32gbit/qla_isr.c @@ -4628,13 +4628,13 @@ msix_failed: if (USER_CTRL_IRQ(ha) || !ha->mqiobase) { /* user wants to control IRQ setting for target mode */ ret = pci_alloc_irq_vectors(ha->pdev, min_vecs, - min((u16)ha->msix_count, (u16)(num_online_cpus() + min_vecs)), - PCI_IRQ_MSIX); + blk_mq_num_online_queues(ha->msix_count) + min_vecs, + PCI_IRQ_MSIX); } else ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs, - min((u16)ha->msix_count, (u16)(num_online_cpus() + min_vecs)), - PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, - &desc); + blk_mq_num_online_queues(ha->msix_count) + min_vecs, + PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, + &desc); #endif if (ret < 0) { diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index c2940f6..c06cd8e 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -1689,7 +1689,7 @@ skip_pio: /* Max queues are bounded by available msix vectors */ /* queue 0 uses two msix vectors */ if (ql2xmultique_tag) { - cpus = num_online_cpus(); + cpus = blk_mq_num_online_queues(0); ha->max_rsp_queues = (ha->msix_count - 1 > cpus) ? (cpus + 1) : (ha->msix_count - 1); ha->max_req_queues = 2; @@ -1778,7 +1778,7 @@ qla83xx_iospace_config(struct qla_hw_data *ha) /* Max queues are bounded by available msix vectors */ /* queue 0 uses two msix vectors */ if (ql2xmultique_tag) { - cpus = num_online_cpus(); + cpus = blk_mq_num_online_queues(0); ha->max_rsp_queues = (ha->msix_count - 1 > cpus) ? (cpus + 1) : (ha->msix_count - 1); ha->max_req_queues = 2; diff --git a/scst/include/backport.h b/scst/include/backport.h index 83a0154..ba9b457 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -237,6 +237,27 @@ void blk_execute_rq_nowait_backport(struct request *rq, bool at_head) #define blk_execute_rq_nowait blk_execute_rq_nowait_backport #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 17, 0) +static inline unsigned int blk_mq_num_queues(const struct cpumask *mask, + unsigned int max_queues) +{ + unsigned int num; + + num = cpumask_weight(mask); + return min_not_zero(num, max_queues); +} + +static inline unsigned int blk_mq_num_possible_queues(unsigned int max_queues) +{ + return blk_mq_num_queues(cpu_possible_mask, max_queues); +} + +static inline unsigned int blk_mq_num_online_queues(unsigned int max_queues) +{ + return blk_mq_num_queues(cpu_online_mask, max_queues); +} +#endif + /* <linux/blkdev.h> */ #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0) && \ diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 137ed83..a10cb69 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -2237,7 +2237,7 @@ static void scst_suspended(struct percpu_ref *ref) static int __init init_scst(void) { int res, i; - int scst_num_cpus; + int num_online_queues; TRACE_ENTRY(); @@ -2284,16 +2284,16 @@ static int __init init_scst(void) if (res != 0) goto out_deinit_threads; - scst_num_cpus = num_online_cpus(); + num_online_queues = blk_mq_num_online_queues(0); /* ToDo: register_cpu_notifier() */ if (scst_threads == 0) - scst_threads = scst_num_cpus; + scst_threads = num_online_queues; if (scst_threads < 1) { PRINT_ERROR("scst_threads can not be less than 1"); - scst_threads = scst_num_cpus; + scst_threads = num_online_queues; } /* Used for rarely used or read-mostly on fast path structures */ @@ -2456,8 +2456,8 @@ static int __init init_scst(void) (unsigned long)&scst_percpu_infos[i]); } - TRACE_DBG("%d CPUs found, starting %d threads", - scst_num_cpus, scst_threads); + TRACE_DBG("%d online queues, starting %d threads", + num_online_queues, scst_threads); res = scst_start_global_threads(scst_threads); if (res < 0) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 4e83358..93ffd61 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1445,7 +1445,7 @@ static int scst_local_driver_probe(struct device *dev) } #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) - hpnt->nr_hw_queues = num_possible_cpus(); + hpnt->nr_hw_queues = blk_mq_num_possible_queues(0); #endif sess->shost = hpnt; |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:15:10
|
Commit: 3960dc8 GitHub URL: https://github.com/SCST-project/scst/commit/3960dc87ac922f1e9bc143fb6266c5fbc0f5c400 Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- qla2x00t-32gbit: Avoid stack frame size warning in qla_dfs The qla2x00_dfs_tgt_port_database_show() function constructs a fake fc_port_t object on the stack, which--depending on the configuration--is large enough to exceed the stack size warning limit: drivers/scsi/qla2xxx/qla_dfs.c:176:1: error: stack frame size (1392) exceeds limit (1280) in 'qla2x00_dfs_tgt_port_database_show' [-Werror,-Wframe-larger-than] Rework this function to no longer need the structure but instead call a custom helper function that just prints the data directly from the port_database_24xx structure. Signed-off-by: Arnd Bergmann <ar...@ar...> Link: https://lore.kernel.org/r/202...@ke... Signed-off-by: Martin K. Petersen <mar...@or...> [ commit 6243146bb019 upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_dfs.c | 20 ++---- qla2x00t-32gbit/qla_gbl.h | 1 + qla2x00t-32gbit/qla_mbx.c | 48 +++++++++++++++ 3 files changed, 55 insertions(+), 14 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_dfs.c b/qla2x00t-32gbit/qla_dfs.c index fbfe051..35be0fe 100644 --- a/qla2x00t-32gbit/qla_dfs.c +++ b/qla2x00t-32gbit/qla_dfs.c @@ -183,10 +183,9 @@ qla2x00_dfs_tgt_port_database_show(struct seq_file *s, void *unused) struct qla_hw_data *ha = vha->hw; struct gid_list_info *gid_list; dma_addr_t gid_list_dma; - fc_port_t fc_port; char *id_iter; int rc, i; - uint16_t entries, loop_id; + uint16_t entries; seq_printf(s, "%s\n", vha->host_str); gid_list = dma_alloc_coherent(&ha->pdev->dev, @@ -209,18 +208,11 @@ qla2x00_dfs_tgt_port_database_show(struct seq_file *s, void *unused) seq_puts(s, "Port Name Port ID Loop ID\n"); for (i = 0; i < entries; i++) { - struct gid_list_info *gid = - (struct gid_list_info *)id_iter; - loop_id = le16_to_cpu(gid->loop_id); - memset(&fc_port, 0, sizeof(fc_port_t)); - - fc_port.loop_id = loop_id; - - rc = qla24xx_gpdb_wait(vha, &fc_port, 0); - seq_printf(s, "%8phC %02x%02x%02x %d\n", - fc_port.port_name, fc_port.d_id.b.domain, - fc_port.d_id.b.area, fc_port.d_id.b.al_pa, - fc_port.loop_id); + struct gid_list_info *gid = (struct gid_list_info *)id_iter; + + rc = qla24xx_print_fc_port_id(vha, s, le16_to_cpu(gid->loop_id)); + if (rc != QLA_SUCCESS) + break; id_iter += ha->gid_list_info_size; } out_free_id_list: diff --git a/qla2x00t-32gbit/qla_gbl.h b/qla2x00t-32gbit/qla_gbl.h index 5cf5608..ee7e82e 100644 --- a/qla2x00t-32gbit/qla_gbl.h +++ b/qla2x00t-32gbit/qla_gbl.h @@ -563,6 +563,7 @@ qla26xx_dport_diagnostics_v2(scsi_qla_host_t *, int qla24xx_send_mb_cmd(struct scsi_qla_host *, mbx_cmd_t *); int qla24xx_gpdb_wait(struct scsi_qla_host *, fc_port_t *, u8); +int qla24xx_print_fc_port_id(struct scsi_qla_host *, struct seq_file *, u16); int qla24xx_gidlist_wait(struct scsi_qla_host *, void *, dma_addr_t, uint16_t *); int __qla24xx_parse_gpdb(struct scsi_qla_host *, fc_port_t *, diff --git a/qla2x00t-32gbit/qla_mbx.c b/qla2x00t-32gbit/qla_mbx.c index 13b6cb1..32eb0ce 100644 --- a/qla2x00t-32gbit/qla_mbx.c +++ b/qla2x00t-32gbit/qla_mbx.c @@ -6597,6 +6597,54 @@ done: return rval; } +int qla24xx_print_fc_port_id(struct scsi_qla_host *vha, struct seq_file *s, u16 loop_id) +{ + int rval = QLA_FUNCTION_FAILED; + dma_addr_t pd_dma; + struct port_database_24xx *pd; + struct qla_hw_data *ha = vha->hw; + mbx_cmd_t mc; + + if (!vha->hw->flags.fw_started) + goto done; + + pd = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); + if (pd == NULL) { + ql_log(ql_log_warn, vha, 0xd047, + "Failed to allocate port database structure.\n"); + goto done; + } + + memset(&mc, 0, sizeof(mc)); + mc.mb[0] = MBC_GET_PORT_DATABASE; + mc.mb[1] = loop_id; + mc.mb[2] = MSW(pd_dma); + mc.mb[3] = LSW(pd_dma); + mc.mb[6] = MSW(MSD(pd_dma)); + mc.mb[7] = LSW(MSD(pd_dma)); + mc.mb[9] = vha->vp_idx; + + rval = qla24xx_send_mb_cmd(vha, &mc); + if (rval != QLA_SUCCESS) { + ql_dbg(ql_dbg_mbx, vha, 0x1193, "%s: fail\n", __func__); + goto done_free_sp; + } + + ql_dbg(ql_dbg_mbx, vha, 0x1197, "%s: %8phC done\n", + __func__, pd->port_name); + + seq_printf(s, "%8phC %02x%02x%02x %d\n", + pd->port_name, pd->port_id[0], + pd->port_id[1], pd->port_id[2], + loop_id); + +done_free_sp: + if (pd) + dma_pool_free(ha->s_dma_pool, pd, pd_dma); +done: + return rval; +} + /* * qla24xx_gpdb_wait * NOTE: Do not call this routine from DPC thread |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:12:14
|
Commit: fae9d2a GitHub URL: https://github.com/SCST-project/scst/commit/fae9d2a1e582b952e4420a39aab27537579506b2 Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- scst: Unbreak UEK and RHEL builds Drop OL6/UEK R4 support. Modified Paths: -------------- .github/workflows/run_regression_tests.yaml | 3 +- nightly/conf/nightly.conf | 1 - qla2x00t-32gbit/qla_os.c | 6 +-- qla2x00t/qla_os.c | 4 +- scst/include/backport.h | 30 +++++++++------ 5 files changed, 25 insertions(+), 19 deletions(-) =================================================================== diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index e04a616..5e3fd93 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -59,8 +59,7 @@ jobs: '5.15.0-312.187.5.3.el9uek^UEK^9', '5.4.17-2136.347.6.3.el8uek^UEK^8', '4.14.35-2047.543.3.1.el7uek^UEK^7', - '4.1.12-124.93.1.el7uek^UEK^7', - '4.1.12-124.48.6.el6uek^UEK^6' + '4.1.12-124.93.1.el7uek^UEK^7' ] steps: - name: Checkout code diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index fb64e81..37791e5 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -101,5 +101,4 @@ ABT_KERNELS=" \ 5.4.17-2136.347.6.3.el8uek^UEK^8-nc \ 4.14.35-2047.543.3.1.el7uek^UEK^7-nc \ 4.1.12-124.93.1.el7uek^UEK^7-nc \ -4.1.12-124.48.6.el6uek^UEK^6-nc \ " diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 56764e9..581e324 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -3032,7 +3032,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -4063,7 +4063,7 @@ qla2x00_remove_one(struct pci_dev *pdev) #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4)) pci_disable_pcie_error_reporting(pdev); #endif @@ -6966,7 +6966,7 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work) pci_release_selected_regions(ha->pdev, ha->bars); #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index c3e2d37..c2940f6 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -2395,7 +2395,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -3052,7 +3052,7 @@ qla2x00_remove_one(struct pci_dev *pdev) #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); diff --git a/scst/include/backport.h b/scst/include/backport.h index 0d58c05..83a0154 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -373,10 +373,11 @@ blkdev_issue_discard_backport(struct block_device *bdev, sector_t sector, * See also f2f2efb807d3 ("byteorder: Move {cpu_to_be32, be32_to_cpu}_array() * from Thunderbolt to core") # v4.15. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) && \ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) && \ (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \ - RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 5) && \ - !defined(UEK_KABI_RENAME) + RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 5) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)) static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) { int i; @@ -941,7 +942,8 @@ static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 7) && \ !defined(CONFIG_SUSE_KERNEL) && \ !defined(_COMPAT_LINUX_MM_H) && \ - !defined(UEK_KABI_RENAME) + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)) /* See also commit 1c542f38ab8d ("mm: Introduce kvcalloc()") # v4.18. */ static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) { @@ -1926,7 +1928,9 @@ static inline struct request *scsi_cmd_to_rq(struct scsi_cmnd *scmd) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || \ (defined(RHEL_RELEASE_CODE) && \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 7)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 7)) || \ + (defined(UEK_KABI_RENAME) && \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd) { #if defined(RHEL_MAJOR) && RHEL_MAJOR -0 == 7 @@ -2099,7 +2103,8 @@ enum { (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 9 || \ RHEL_MAJOR -0 == 9 && RHEL_MINOR -0 < 3) && \ - !defined(UEK_KABI_RENAME) + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) /* * See also commit 64fd2ba977b1 ("scsi: scsi_transport_fc: Add an additional * flag to fc_host_fpin_rcv()") # v6.3 @@ -2142,7 +2147,9 @@ static inline int fc_block_rport(struct fc_rport *rport) /* See also commit a7dff3ad4787 ("scsi: fc: add FPIN ELS definition") # v5.2 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && \ (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ - (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 2)) + (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 2)) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)) #define ELS_FPIN 0x16 #endif @@ -2150,10 +2157,11 @@ static inline int fc_block_rport(struct fc_rport *rport) * See also commit 62e9dd177732 ("scsi: qla2xxx: Change in PUREX to handle FPIN * ELS requests"). */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0) && \ - (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ - (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 4)) && \ - !(defined(UEK_KABI_RENAME) && defined(FC_PORTSPEED_256GBIT)) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ + (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 4)) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)) #define ELS_RDP 0x18 #endif |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:11:59
|
Commit: 5245d1c GitHub URL: https://github.com/SCST-project/scst/commit/5245d1cb15b8ccf6a3a044ea58ce87652788c639 Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- .github/workflows: Print compilation output and improve annotations Show the kernel compilation output whenever the run reached the compilation stage (both pass/fail cases) and add a readable prefix with the actual filename. Also refactor to use variables for version, workdir, and output; quote expansions; and switch to titled GitHub Actions annotations. Drop `-k` and rely on explicit cleanup. Modified Paths: -------------- .github/workflows/run_regression_tests.yaml | 23 +++++++++++---- 1 file changed, 17 insertions(+), 6 deletions(-) =================================================================== diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index 2bf37f2..e04a616 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -85,19 +85,30 @@ jobs: - name: Run regression tests run: | err=0 + version="${{matrix.version}}" + workdir="/tmp/scst-${version}" + out="output.txt" - ./scripts/run-regression-tests -l -q -k -d /tmp/scst-${{matrix.version}} ${{matrix.version}}-nc-ns-nm | tee output.txt + ./scripts/run-regression-tests -l -q -d "${workdir}" "${version}-nc-ns-nm" | tee "${out}" - if ! grep -q "Compiling the patched kernel" output.txt; then - echo "::error ::run-regression-tests failed" + if ! grep -q "Compiling the patched kernel" "${out}"; then + echo "::error title=Regression tests::run-regression-tests failed" err=1 else - if grep -A1 "Compiling the patched kernel" output.txt | grep -E -q "FAILED|[1-9][0-9]* errors"; then - echo "::error ::Regression test failed" + if grep -A1 "Compiling the patched kernel" "${out}" | grep -E -q "FAILED|[1-9][0-9]* errors"; then + echo "::error title=Regression tests::Regression test failed" err=1 + else + echo "::notice title=Regression tests::Succeeded" fi + + f=( "${workdir}"/compilation-*-output.txt ) + echo + echo "===== $(basename "${f[0]}") =====" + cat "${f[0]}" fi - rm -f output.txt + rm -rf "${workdir}" + rm -f "${out}" exit $err |
|
From: Gleb C. <lna...@ya...> - 2025-10-01 19:11:49
|
Commit: 59bdb24 GitHub URL: https://github.com/SCST-project/scst/commit/59bdb2463c1c7f4ea4e5363db043784139b294f5 Author: Gleb Chesnokov Date: 2025-10-01T22:11:28+03:00 Log Message: ----------- scripts/specialize-patch: treat "#if 0" and "#if 0 && ..." as constant-false Partial evaluation can yield guards like "+#if 0 && ...". These are false but bypassed the filter that only matched exact "+#if 0"/"+#elif 0". Tighten the regex to match the original spacing and catch both forms. This is the minimal change addressing the bug observed in logs such as: (c) +#if 0 && !(1 && defined(FC_PORTSPEED_256GBIT)) ... (g2) ... output = 1 <-- wrong After this change such guards are dropped correctly (output = 0). Modified Paths: -------------- scripts/specialize-patch | 2 +- scst/include/backport.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) =================================================================== diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 5c00244..06e49ba 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -553,7 +553,7 @@ function process_preprocessor_statement(evaluated, condition) { if (debug) printf "/* debug specialize-patch: (g1b) %s: decision[%d] = %s */\n", \ evaluated, i, decision[i] - output = output && decision[i] != "+#if 0" && decision[i] != "+#elif 0" + output = output && decision[i] !~ "^+#(if|elif) 0($| &&)" } if (output) any_section_output[if_nesting_level] = 1 diff --git a/scst/include/backport.h b/scst/include/backport.h index ef02080..0d58c05 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -2152,7 +2152,7 @@ static inline int fc_block_rport(struct fc_rport *rport) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0) && \ (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ - RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 4) && \ + (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 4)) && \ !(defined(UEK_KABI_RENAME) && defined(FC_PORTSPEED_256GBIT)) #define ELS_RDP 0x18 #endif |
|
From: Gleb C. <lna...@ya...> - 2025-09-30 15:12:02
|
Commit: 9543060 GitHub URL: https://github.com/SCST-project/scst/commit/9543060a2ccbb5c3c5a214da8582abaa1278386e Author: Gleb Chesnokov Date: 2025-09-30T18:09:11+03:00 Log Message: ----------- scripts/generate-kernel-patch: Use krel for qla2xxx patch paths Fix mismatch where generate-kernel-patch keyed paths by full_kver (with ‘^’) but in-tree patches were written under krel (before ‘^’). Derive krel=${full_kver/^*} and use it for qla2xxx path resolution. Modified Paths: -------------- qla2x00t-32gbit/extract-qla2xxx-orig | 28 ++++++++------- qla2x00t-32gbit/generate-in-tree-patches | 26 +++++++------- qla2x00t/extract-qla2xxx-orig | 21 ++++++----- qla2x00t/generate-in-tree-patches | 22 ++++++------ scripts/generate-kernel-patch | 18 ++++++---- scripts/run-regression-tests | 6 ++-- 6 files changed, 65 insertions(+), 56 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/extract-qla2xxx-orig b/qla2x00t-32gbit/extract-qla2xxx-orig index c969fbf..124f324 100755 --- a/qla2x00t-32gbit/extract-qla2xxx-orig +++ b/qla2x00t-32gbit/extract-qla2xxx-orig @@ -6,25 +6,27 @@ source "$(dirname "$0")/../scripts/kernel-functions" || exit $? # Argument verification # ######################### -kernel_version="$1" +full_kver="$1" -if [ "$1" = "" ]; then +if [ "${full_kver}" = "" ]; then echo "Error: missing kernel version argument." exit 1 fi +krel=${full_kver/^*} + mkdir -p qla2xxx-orig cd qla2xxx-orig || exit $? -download_and_extract_kernel_tree "${kernel_version}" || exit $? -kernel_version=${kernel_version/^*} -touch "linux-${kernel_version}"/drivers/scsi/qla2xxx/* -rm -rf "${kernel_version}" -mkdir -p "${kernel_version}/include/trace/events" -mv "linux-${kernel_version}"/drivers/scsi/qla2xxx/* "${kernel_version}" -if [ -e "linux-${kernel_version}"/include/trace/events/qla.h ]; then - touch "linux-${kernel_version}"/include/trace/events/qla.h - mv "linux-${kernel_version}"/include/trace/events/qla.h \ - "${kernel_version}/include/trace/events" +download_and_extract_kernel_tree "${full_kver}" || exit $? + +touch "linux-${krel}"/drivers/scsi/qla2xxx/* +rm -rf "${krel}" +mkdir -p "${krel}/include/trace/events" + +mv "linux-${krel}"/drivers/scsi/qla2xxx/* "${krel}" +if [ -e "linux-${krel}"/include/trace/events/qla.h ]; then + touch "linux-${krel}"/include/trace/events/qla.h + mv "linux-${krel}"/include/trace/events/qla.h "${krel}/include/trace/events" fi -rm -rf "linux-${kernel_version}" +rm -rf "linux-${krel}" cd .. diff --git a/qla2x00t-32gbit/generate-in-tree-patches b/qla2x00t-32gbit/generate-in-tree-patches index bcc5db2..4ab0e5c 100755 --- a/qla2x00t-32gbit/generate-in-tree-patches +++ b/qla2x00t-32gbit/generate-in-tree-patches @@ -1,24 +1,24 @@ #!/bin/bash -kernel_version="$1" +full_kver="$1" -if [ "$kernel_version" = "" ]; then +if [ "$full_kver" = "" ]; then echo "Error: missing kernel version argument." exit 1 fi -if [ ! -e qla2xxx-orig/${kernel_version/^*} ]; then - "$(dirname "$0")/extract-qla2xxx-orig" "$kernel_version" || exit $? -fi +krel=${full_kver/^*} -kernel_version=${kernel_version/^*} +if [ ! -e qla2xxx-orig/"${krel}" ]; then + "$(dirname "$0")/extract-qla2xxx-orig" "${full_kver}" || exit $? +fi -mkdir -p in-tree-patches/"${kernel_version}" +mkdir -p in-tree-patches/"${krel}" for g in Kconfig *.[ch]; do - f1="qla2xxx-orig/${kernel_version}/$g" + f1="qla2xxx-orig/${krel}/$g" f2="$g" - f3="in-tree-patches/${kernel_version}/$g.patch" + f3="in-tree-patches/${krel}/$g.patch" if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then if [ -e "$f1" ]; then diff -up "$f1" "$f2" > "$f3" @@ -29,9 +29,9 @@ for g in Kconfig *.[ch]; do done for g in include/trace/events/qla.h; do - f1="qla2xxx-orig/${kernel_version}/$g" + f1="qla2xxx-orig/${krel}/$g" f2="$g" - f3="in-tree-patches/${kernel_version}/${g#include/trace/events/}.patch" + f3="in-tree-patches/${krel}/${g#include/trace/events/}.patch" if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then if [ -e "$f1" ]; then diff -up "$f1" "$f2" > "$f3" @@ -42,9 +42,9 @@ for g in include/trace/events/qla.h; do done for g in Makefile; do - f1="qla2xxx-orig/${kernel_version}/$g" + f1="qla2xxx-orig/${krel}/$g" f2="${g}_in-tree" - f3="in-tree-patches/${kernel_version}/$g.patch" + f3="in-tree-patches/${krel}/$g.patch" if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then diff -up "$f1" "$f2" > "$f3" fi diff --git a/qla2x00t/extract-qla2xxx-orig b/qla2x00t/extract-qla2xxx-orig index 2f9e8c3..7f1b502 100755 --- a/qla2x00t/extract-qla2xxx-orig +++ b/qla2x00t/extract-qla2xxx-orig @@ -6,20 +6,23 @@ source "$(dirname "$0")/../scripts/kernel-functions" || exit $? # Argument verification # ######################### -kernel_version="$1" +full_kver="$1" -if [ "$1" = "" ]; then +if [ "${full_kver}" = "" ]; then echo "Error: missing kernel version argument." exit 1 fi +krel=${full_kver/^*} + mkdir -p qla2xxx-orig cd qla2xxx-orig || exit $? -download_and_extract_kernel_tree "${kernel_version}" || exit $? -kernel_version=${kernel_version/^*} -touch "linux-${kernel_version}"/drivers/scsi/qla2xxx/* -rm -rf "${kernel_version}" -mkdir -p "${kernel_version}" -mv "linux-${kernel_version}"/drivers/scsi/qla2xxx/* "${kernel_version}" -rm -rf "linux-${kernel_version}" +download_and_extract_kernel_tree "${full_kver}" || exit $? + +touch "linux-${krel}"/drivers/scsi/qla2xxx/* +rm -rf "${krel}" +mkdir -p "${krel}" + +mv "linux-${krel}"/drivers/scsi/qla2xxx/* "${krel}" +rm -rf "linux-${krel}" cd .. diff --git a/qla2x00t/generate-in-tree-patches b/qla2x00t/generate-in-tree-patches index 5d57317..3256f56 100755 --- a/qla2x00t/generate-in-tree-patches +++ b/qla2x00t/generate-in-tree-patches @@ -1,24 +1,24 @@ #!/bin/bash -kernel_version="$1" +full_kver="$1" -if [ "$kernel_version" = "" ]; then +if [ "${full_kver}" = "" ]; then echo "Error: missing kernel version argument." exit 1 fi -if [ ! -e qla2xxx-orig/${kernel_version/^*} ]; then - "$(dirname "$0")/extract-qla2xxx-orig" "$kernel_version" || exit $? -fi +krel=${full_kver/^*} -kernel_version=${kernel_version/^*} +if [ ! -e qla2xxx-orig/"${krel}" ]; then + "$(dirname "$0")/extract-qla2xxx-orig" "${full_kver}" || exit $? +fi -mkdir -p in-tree-patches/"${kernel_version}" +mkdir -p in-tree-patches/"${krel}" for g in Kconfig *.[ch]; do - f1="qla2xxx-orig/${kernel_version}/$g" + f1="qla2xxx-orig/${krel}/$g" f2="$g" - f3="in-tree-patches/${kernel_version}/$g.patch" + f3="in-tree-patches/${krel}/$g.patch" if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then if [ -e "$f1" ]; then diff -up "$f1" "$f2" > "$f3" @@ -29,9 +29,9 @@ for g in Kconfig *.[ch]; do done for g in Makefile; do - f1="qla2xxx-orig/${kernel_version}/$g" + f1="qla2xxx-orig/${krel}/$g" f2="${g}_in-tree" - f3="in-tree-patches/${kernel_version}/$g.patch" + f3="in-tree-patches/${krel}/$g.patch" if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then diff -up "$f1" "$f2" > "$f3" fi diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index ca73bce..e54b65a 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -236,7 +236,8 @@ fi # Strip patch level from the kernel version number. full_kver="$1" -kver="$(kernel_version "$1")" +kver="$(kernel_version "${full_kver}")" +krel=${full_kver/^*} # See also commit 89d9a567952b ("[SCSI] add support for per-host cmd pools"; # v3.15). @@ -490,11 +491,11 @@ add_file "iscsi-scst/README_in-tree" "Documentation/scst/README.iscsi" \ if [ "${qla2x00t}" = "true" ]; then - ( cd qla2x00t && "$PWD/generate-in-tree-patches" "$1" ) || exit $? + ( cd qla2x00t && "$PWD/generate-in-tree-patches" "${full_kver}" ) || exit $? - for f in qla2x00t/in-tree-patches/"$1"/*.patch; do + for f in qla2x00t/in-tree-patches/"${krel}"/*.patch; do [ -e "$f" ] || continue - g="${f#qla2x00t/in-tree-patches/$1/}" + g="${f#qla2x00t/in-tree-patches/"${krel}"/}" g="${g%.patch}" add_patch "${f}" "drivers/scsi/qla2xxx/${g}" done @@ -516,12 +517,14 @@ if [ "${qla2x00t}" = "true" ]; then elif [ "${qla2x00t_32gbit}" = "true" ]; then - ( cd qla2x00t-32gbit && "$PWD/generate-in-tree-patches" "$1" ) || exit $? + ( cd qla2x00t-32gbit && "$PWD/generate-in-tree-patches" "${full_kver}" ) || exit $? - for f in qla2x00t-32gbit/in-tree-patches/"$1"/*.patch; do + for f in qla2x00t-32gbit/in-tree-patches/"${krel}"/*.patch; do [ -e "$f" ] || continue - g="${f#qla2x00t-32gbit/in-tree-patches/$1/}" + + g="${f#qla2x00t-32gbit/in-tree-patches/"${krel}"/}" g="${g%.patch}" + if [ "$g" = "qla.h" ]; then add_patch "${f}" "include/trace/events/${g}" else @@ -531,6 +534,7 @@ elif [ "${qla2x00t_32gbit}" = "true" ]; then for f in qla2x00t-32gbit/qla2x00-target/*.[ch]; do [ -e "$f" ] || continue + add_file "${f}" "drivers/scsi/qla2xxx/${f#qla2x00t-32gbit/qla2x00-target/}" done diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index 40a3da8..f16ab18 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -210,11 +210,11 @@ function generate_kernel_patch { kver="$(kernel_version "${1/^*}")" driver_options=(-l) - "${scriptsdir}"/generate-kernel-patch "${driver_options[@]}" $2 "$1" > "${patchfile}" + "${scriptsdir}"/generate-kernel-patch "${driver_options[@]}" "$2" "$1" > "${patchfile}" - "${scriptsdir}"/generate-kernel-patch "${driver_options[@]}" -n $2 "$1" > "${patchfile_m}" + "${scriptsdir}"/generate-kernel-patch "${driver_options[@]}" -n "$2" "$1" > "${patchfile_m}" - "${scriptsdir}"/generate-kernel-patch "${driver_options[@]}" -p "${outputdir}/${patchdir}" $2 "$1" + "${scriptsdir}"/generate-kernel-patch "${driver_options[@]}" -p "${outputdir}/${patchdir}" "$2" "$1" } # Run checkpatch on the generated kernel patch. Assumes that there is a |
|
From: Gleb C. <lna...@ya...> - 2025-09-30 15:11:10
|
Commit: 90c26fa GitHub URL: https://github.com/SCST-project/scst/commit/90c26fa844f03fcaa6eff9fd1747452fbae91a17 Author: Gleb Chesnokov Date: 2025-09-30T18:09:11+03:00 Log Message: ----------- scripts/run-regression-tests: Drop 2.6.x paths and simplify builds Always include drivers/scsi/qla2xxx in subdirs and extend the local module build loop to cover both qla2x00t and qla2x00t-32gbit. Modified Paths: -------------- scripts/generate-kernel-patch | 66 +++------------ scripts/run-regression-tests | 29 ++----- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.18.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.23.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.25.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.27.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.28.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.29.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.30.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.31.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.32.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.33.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.34.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.35.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.36.patch | 12 --- scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.7.patch | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.23 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.24 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.25 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.26 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.27 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.28 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.29 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.30 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.31 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.32 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.33 | 11 --- scst/kernel/in-tree/Makefile.dev_handlers-2.6.34 | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.15.patch | 10 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.18.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.23.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.25.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.27.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.28.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.29.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.30.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.31.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.32.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.33.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.34.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.35.patch | 8 -- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.36.patch | 8 -- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.37.patch | 9 -- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.38.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.39.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-2.6.7.patch | 10 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.0.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.1.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.2.patch | 11 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.3.patch | 12 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.4.patch | 12 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.5.patch | 12 --- scst/kernel/in-tree/Makefile.drivers.Linux-3.6.patch | 12 --- scst/kernel/in-tree/Makefile.scst-2.6.23 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.24 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.25 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.26 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.27 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.28 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.29 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.30 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.31 | 16 ---- scst/kernel/in-tree/Makefile.scst-2.6.32 | 16 ---- 67 files changed, 20 insertions(+), 849 deletions(-) =================================================================== diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 7a0480a..ca73bce 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -238,13 +238,6 @@ fi full_kver="$1" kver="$(kernel_version "$1")" -# Include fcst in the patch for kernel versions 2.6.33 and later. -if kernel_version_le "2.6.37" "${kver}"; then - include_fcst="true" -else - include_fcst="false" -fi - # See also commit 89d9a567952b ("[SCSI] add support for per-host cmd pools"; # v3.15). if kernel_version_lt "$kver" 3.18; then @@ -261,15 +254,8 @@ else scst_makefile="Makefile.scst" fi -# Make sure that for kernel 2.6.26 and later the line -# "#define CONFIG_SCST_PROC" is removed from scst/include/scst.h. -if grep -qw scst_sysfs scst/kernel/in-tree/${scst_makefile} \ - || [ "${generating_upstream_patch}" = "true" ]; -then - specialize_patch_options+=(-v "config_scst_proc_undefined=1") -else - include_proc_impl="true" -fi +specialize_patch_options+=(-v "config_scst_proc_undefined=1") + if [ "${debug_specialize}" = "true" ]; then specialize_patch_options+=(-v "debug=1") fi @@ -315,7 +301,6 @@ scst_06_lib="scst/src/scst_lib.c" scst_07_pres="scst/src/scst_pres.h scst/src/scst_pres.c" scst_08_sysfs="scst/src/scst_sysfs.c" scst_09_debug="scst/include/scst_debug.h scst/src/scst_debug.c" -scst_proc="scst/src/scst_proc.c" scst_10_sgv="scst/include/scst_sgv.h scst/src/scst_mem.h scst/src/scst_mem.c doc/scst_pg.sgml" scst_user="scst/include/scst_user.h scst/src/dev_handlers/scst_user.c" scst_13_vdisk="scst/src/dev_handlers/scst_vdisk.c" @@ -323,11 +308,8 @@ scst_14_tg="scst/src/scst_tg.c" separate_patches="scst_03_public_headers scst_04_main scst_05_targ scst_06_lib scst_07_pres scst_08_sysfs scst_09_debug scst_10_sgv scst_user scst_13_vdisk scst_14_tg" # Suppress shellcheck warnings about unused variables. -echo "$scst_03_public_headers $scst_04_main $scst_05_targ $scst_06_lib $scst_07_pres $scst_08_sysfs $scst_09_debug $scst_proc $scst_10_sgv $scst_user $scst_13_vdisk $scst_14_tg" >/dev/null +echo "$scst_03_public_headers $scst_04_main $scst_05_targ $scst_06_lib $scst_07_pres $scst_08_sysfs $scst_09_debug $scst_10_sgv $scst_user $scst_13_vdisk $scst_14_tg" >/dev/null -if [ "$include_proc_impl" = "true" ]; then - separate_patches+=" scst_proc" -fi source_files_in_separate_patch="" for s in ${separate_patches} do @@ -347,8 +329,7 @@ else "drivers/Kconfig" fi -if [ "${full_kver#2.6.32-}" = "${full_kver}" ] && - [ -e "scst/kernel/in-tree/Makefile.drivers.Linux-${kver}.patch" ]; then +if [ -e "scst/kernel/in-tree/Makefile.drivers.Linux-${kver}.patch" ]; then add_patch "scst/kernel/in-tree/Makefile.drivers.Linux-${kver}.patch"\ "drivers/Makefile" else @@ -366,29 +347,11 @@ tmpdir="/tmp/scst-$$" mkdir -p "${tmpdir}" tmp_Kconfig="${tmpdir}/Kconfig.scst-${kver}" -# shellcheck disable=SC2002 -cat "scst/kernel/in-tree/Kconfig.scst" | \ -if [ "${include_fcst}" = true ]; then - cat -else - grep -v '^source "drivers/scst/fcst/Kconfig"$' -fi >"${tmp_Kconfig}" +cat "scst/kernel/in-tree/Kconfig.scst" >"${tmp_Kconfig}" add_file "${tmp_Kconfig}" "drivers/scst/Kconfig" tmp_Makefile="${tmpdir}/${scst_makefile}" -# shellcheck disable=SC2002 -cat "scst/kernel/in-tree/${scst_makefile}" | \ -if [ "$include_proc_impl" != "true" ]; then - grep -v 'scst_proc' -else - cat -fi | \ - if [ "${include_fcst}" = true ] && [ "${kver}" != "2.6.37" ] && - [ "${kver}" != "2.6.38" ]; then - cat -else - sed -e 's: fcst/* : :' -fi >"$tmp_Makefile" +cat "scst/kernel/in-tree/${scst_makefile}" >"${tmp_Makefile}" add_file "$tmp_Makefile" "drivers/scst/Makefile" rm -rf "${tmpdir}" @@ -434,8 +397,7 @@ done # Directory drivers/scst/dev_handlers/ -if [ -e "scst/kernel/in-tree/Makefile.dev_handlers-${kver}" ] -then +if [ -e "scst/kernel/in-tree/Makefile.dev_handlers-${kver}" ]; then add_file "scst/kernel/in-tree/Makefile.dev_handlers-${kver}" \ "drivers/scst/dev_handlers/Makefile" \ | process_patch "scst_11_dev_handlers_makefile.diff" @@ -456,7 +418,7 @@ done \ # Directory drivers/scst/fcst/ -if [ "${include_fcst}" = true ]; then +( if [ -e "${fcst_patch_series}" ]; then grep -v '^#' "${fcst_patch_series}" | while read -r f; do @@ -474,8 +436,7 @@ if [ "${include_fcst}" = true ]; then [ -e "$f" ] || continue add_file "${f}" "drivers/scst/fcst/${f#fcst/}" done -fi \ -| process_patch "fcst.diff" +) | process_patch "fcst.diff" add_file "fcst/README" "Documentation/scst/README.fcst" \ | process_patch "fcst-doc.diff" @@ -519,8 +480,7 @@ for f in iscsi-scst/kernel/isert-scst/*.[ch]; do done add_file "iscsi-scst/kernel/isert-scst/Makefile.in-kernel" "drivers/scst/iscsi-scst/isert-scst/Makefile" add_file "iscsi-scst/kernel/isert-scst/Kconfig" "drivers/scst/iscsi-scst/isert-scst/Kconfig" -) \ -| process_patch "iscsi-scst.diff" +) | process_patch "iscsi-scst.diff" add_file "iscsi-scst/README_in-tree" "Documentation/scst/README.iscsi" \ | process_patch "iscsi-scst-doc.diff" @@ -578,8 +538,7 @@ elif [ "${qla2x00t_32gbit}" = "true" ]; then "Documentation/scst/README.qla2x00t" \ | process_patch "qla2x00t-doc.diff" -fi \ -| process_patch "qla2x00t.diff" +fi | process_patch "qla2x00t.diff" # Directory drivers/scst/srpt @@ -639,5 +598,4 @@ fi \ fi add_file "scst_local/scst_local.c" "drivers/scst/scst_local/scst_local.c" -) \ -| process_patch "scst_16_local.diff" +) | process_patch "scst_16_local.diff" diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index 05b81a6..40a3da8 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -125,12 +125,12 @@ function make_dpkg { function compile_scst { ( - for p in scst scst_local iscsi-scst srpt qla2x00t qla2x00t-32gbit; do - if [ "${p%qla2x00t}" != "$p" ]; then + for d in scst iscsi-scst qla2x00t qla2x00t-32gbit srpt scst_local fcst usr; do + if [[ $d = qla2x00t || $d = qla2x00t-32gbit ]]; then BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y \ - make -C "$p/qla2x00-target" || return $? + make -j"$(nproc)" -C "$d" || return $? else - make -C "$p" || return $? + make -j"$(nproc)" -C "$d" || return $? fi done ) @@ -321,17 +321,8 @@ CONFIG_LTO_CLANG \ " local enable="CONFIG_UNWINDER_FRAME_POINTER" - case "$1" in - 2.6.32-*) - echo "Enabling CONFIG_EVENT_TRACING for CentOS 6.x" - enable="$enable \ - CONFIG_DEBUG_KERNEL \ - CONFIG_FTRACE \ - CONFIG_EVENT_TRACING \ - CONFIG_DYNAMIC_DEBUG";; - *) - disable="$disable CONFIG_EVENT_TRACING";; - esac + # SCST does not need event tracing on supported kernels + disable="$disable CONFIG_EVENT_TRACING" echo "Patching and configuring kernel ..." if [ "$ipv6" = "false" ]; then @@ -394,7 +385,7 @@ function compile_kernel { if (cd "${outputdir}/linux-$k" \ && make -s modules_prepare \ && make -s scripts \ - && for subdir; do LC_ALL=C KBUILD_MODPOST_WARN=1 make -j$(nproc) -k M="${subdir}"; done + && for subdir; do LC_ALL=C KBUILD_MODPOST_WARN=1 make -j"$(nproc)" -k M="${subdir}"; done ) &> "${outputfile}" then local errors warnings @@ -581,7 +572,6 @@ kernel_versions="" outputdir="${PWD}/regression-test-output-$(date +%Y-%m-%d_%Hh%Mm%Ss)" # Driver configuration. multiple_patches="false" -qla2x00t="true" remove_temporary_files_at_end="false" run_local_compilation="true" quiet_download="false" @@ -713,7 +703,7 @@ do fi done export KCFLAGS - subdirs=(drivers/scst) + subdirs=(drivers/scst drivers/scsi/qla2xxx) if [ "${run_sparse}" = "true" ]; then run_sparse "$k" "${subdirs[@]}" mv "${outputdir}/sparse-$k-output.txt" \ @@ -728,9 +718,6 @@ do if [ "${run_smatch}" = "true" ]; then run_smatch "$k" "${subdirs[@]}" fi - if [ "${qla2x00t}" = "true" ] && kernel_version_le 2.6.37 "$k"; then - subdirs+=(drivers/scsi/qla2xxx) - fi compile_kernel "$k" "${subdirs[@]}" if [ "${full_check}" = "true" ]; then run_headers_check "$k" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.18.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.18.patch deleted file mode 100644 index f6ed088..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.18.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uprN ../orig/linux-2.6.24/drivers/Kconfig linux-2.6.24/drivers/Kconfig ---- ../orig/linux-2.6.24/drivers/Kconfig 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/Kconfig 2008-05-13 13:05:55.000000000 +0200 -@@ -18,6 +18,8 @@ - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/cdrom/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.23.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.23.patch deleted file mode 100644 index 27828ce..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.23.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uprN ../orig/linux-2.6.23/drivers/Kconfig linux-2.6.23/drivers/Kconfig ---- ../orig/linux-2.6.23/drivers/Kconfig 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.23/drivers/Kconfig 2008-05-13 13:05:55.000000000 +0200 -@@ -24,6 +24,8 @@ - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch deleted file mode 100644 index 01aeb90..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uprN ../orig/linux-2.6.24/drivers/Kconfig linux-2.6.24/drivers/Kconfig ---- ../orig/linux-2.6.24/drivers/Kconfig 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/Kconfig 2008-05-13 13:05:55.000000000 +0200 -@@ -24,6 +24,8 @@ - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.25.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.25.patch deleted file mode 100644 index 01aeb90..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.25.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uprN ../orig/linux-2.6.24/drivers/Kconfig linux-2.6.24/drivers/Kconfig ---- ../orig/linux-2.6.24/drivers/Kconfig 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/Kconfig 2008-05-13 13:05:55.000000000 +0200 -@@ -24,6 +24,8 @@ - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch deleted file mode 100644 index c259d7a..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.26/Documentation/dontdiff linux-2.6.26/drivers/Kconfig linux-2.6.26/drivers/Kconfig ---- linux-2.6.26/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.26/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.27.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.27.patch deleted file mode 100644 index a4349cd..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.27.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.27/Documentation/dontdiff linux-2.6.27/drivers/Kconfig linux-2.6.27/drivers/Kconfig ---- linux-2.6.27/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.27/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.28.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.28.patch deleted file mode 100644 index b817c63..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.28.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/Kconfig linux-2.6.28/drivers/Kconfig ---- linux-2.6.28/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.28/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.29.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.29.patch deleted file mode 100644 index 81fc97e..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.29.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.29/Documentation/dontdiff linux-2.6.29/drivers/Kconfig linux-2.6.29/drivers/Kconfig ---- linux-2.6.29/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.29/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.30.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.30.patch deleted file mode 100644 index b6419e2..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.30.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.30/Documentation/dontdiff linux-2.6.30/drivers/Kconfig linux-2.6.30/drivers/Kconfig ---- linux-2.6.30/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.30/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.31.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.31.patch deleted file mode 100644 index b0348e2..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.31.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.31/Documentation/dontdiff linux-2.6.31/drivers/Kconfig linux-2.6.31/drivers/Kconfig ---- linux-2.6.31/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.31/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.32.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.32.patch deleted file mode 100644 index efe1eac..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.32.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.32/Documentation/dontdiff linux-2.6.32/drivers/Kconfig linux-2.6.32/drivers/Kconfig ---- linux-2.6.32/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.32/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.33.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.33.patch deleted file mode 100644 index ea96885..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.33.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.33/Documentation/dontdiff linux-2.6.33/drivers/Kconfig linux-2.6.33/drivers/Kconfig ---- linux-2.6.33/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.33/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.34.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.34.patch deleted file mode 100644 index 2cb16ac..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.34.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.34/Documentation/dontdiff linux-2.6.34/drivers/Kconfig linux-2.6.34/drivers/Kconfig ---- linux-2.6.34/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.34/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -22,6 +22,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.35.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.35.patch deleted file mode 100644 index 774ec23..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.35.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.35/Documentation/dontdiff linux-2.6.35/drivers/Kconfig linux-2.6.35/drivers/Kconfig ---- linux-2.6.35/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.35/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -22,6 +22,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.36.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.36.patch deleted file mode 100644 index 080648e..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.36.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upkr -X linux-2.6.36/Documentation/dontdiff linux-2.6.36/drivers/Kconfig linux-2.6.36/drivers/Kconfig ---- linux-2.6.36/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.36/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 -@@ -22,6 +22,8 @@ source "drivers/ide/Kconfig" - - source "drivers/scsi/Kconfig" - -+source "drivers/scst/Kconfig" -+ - source "drivers/ata/Kconfig" - - source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.7.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.7.patch deleted file mode 100644 index 79d02cf..0000000 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.7.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Kconfig 2004-08-18 13:14:50.328907320 +0400 -+++ Kconfig.scsi 2004-08-13 18:01:13.000000000 +0400 -@@ -1261,6 +1261,8 @@ config SCSI_QLOGICPTI - - source "drivers/scsi/qla2xxx/Kconfig" - -+source "drivers/scsi/scsi_tgt/Kconfig" -+ - config SCSI_SEAGATE - tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support" - depends on X86 && ISA && SCSI && BROKEN diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.23 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.23 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.23 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.24 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.24 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.24 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.25 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.25 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.25 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.26 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.26 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.26 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.27 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.27 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.27 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.28 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.28 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.28 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.29 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.29 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.29 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.30 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.30 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.30 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.31 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.31 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.31 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.32 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.32 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.32 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.33 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.33 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.33 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.34 b/scst/kernel/in-tree/Makefile.dev_handlers-2.6.34 deleted file mode 100644 index 8c2c62c..0000000 --- a/scst/kernel/in-tree/Makefile.dev_handlers-2.6.34 +++ /dev/null @@ -1,11 +0,0 @@ -ccflags-y += -Iinclude/scst -Wno-unused-parameter - -obj-$(CONFIG_SCST_DISK) += scst_disk.o -obj-$(CONFIG_SCST_TAPE) += scst_tape.o -obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o -obj-$(CONFIG_SCST_MODISK) += scst_modisk.o -obj-$(CONFIG_SCST_CHANGER) += scst_changer.o -obj-$(CONFIG_SCST_RAID) += scst_raid.o -obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o -obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o -obj-$(CONFIG_SCST_USER) += scst_user.o diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.15.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.15.patch deleted file mode 100644 index ac3027f..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.15.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Makefile.orig 2006-12-11 14:29:39.000000000 -0700 -+++ Makefile 2006-12-11 14:29:52.000000000 -0700 -@@ -81,6 +81,7 @@ - obj-$(CONFIG_SCSI_QLOGIC_FC) += qlogicfc.o - obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o - obj-$(CONFIG_SCSI_QLA2XXX) += qla2xxx/ -+obj-$(CONFIG_SCST) += scsi_tgt/ - obj-$(CONFIG_SCSI_LPFC) += lpfc/ - obj-$(CONFIG_SCSI_PAS16) += pas16.o - obj-$(CONFIG_SCSI_SEAGATE) += seagate.o diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.18.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.18.patch deleted file mode 100644 index 12015a9..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.18.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uprN ../orig/linux-2.6.24/drivers/Makefile linux-2.6.24/drivers/Makefile ---- ../orig/linux-2.6.24/drivers/Makefile 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/Makefile 2008-05-13 13:06:34.000000000 +0200 -@@ -34,6 +34,7 @@ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_FC4) += fc4/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_IEEE1394) += ieee1394/ - obj-y += cdrom/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.23.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.23.patch deleted file mode 100644 index 4d89fd8..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.23.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uprN ../orig/linux-2.6.23/drivers/Makefile linux-2.6.23/drivers/Makefile ---- ../orig/linux-2.6.23/drivers/Makefile 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.23/drivers/Makefile 2008-05-13 13:06:34.000000000 +0200 -@@ -35,6 +35,7 @@ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch deleted file mode 100644 index e4daf75..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uprN ../orig/linux-2.6.24/drivers/Makefile linux-2.6.24/drivers/Makefile ---- ../orig/linux-2.6.24/drivers/Makefile 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/Makefile 2008-05-13 13:06:34.000000000 +0200 -@@ -35,6 +35,7 @@ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.25.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.25.patch deleted file mode 100644 index d5fc9a7..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.25.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uprN ../orig/linux-2.6.24/drivers/Makefile linux-2.6.24/drivers/Makefile ---- ../orig/linux-2.6.24/drivers/Makefile 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/Makefile 2008-05-13 13:06:34.000000000 +0200 -@@ -36,6 +36,7 @@ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch deleted file mode 100644 index 1f26ba3..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.26/Documentation/dontdiff linux-2.6.26/drivers/Makefile linux-2.6.26/drivers/Makefile ---- linux-2.6.26/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.26/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -36,6 +36,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.27.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.27.patch deleted file mode 100644 index da3e450..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.27.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.27/Documentation/dontdiff linux-2.6.27/drivers/Makefile linux-2.6.27/drivers/Makefile ---- linux-2.6.27/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.27/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -39,6 +39,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.28.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.28.patch deleted file mode 100644 index 000ee24..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.28.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/Makefile linux-2.6.28/drivers/Makefile ---- linux-2.6.28/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.28/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -39,6 +39,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.29.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.29.patch deleted file mode 100644 index eb2defe..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.29.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.29/Documentation/dontdiff linux-2.6.29/drivers/Makefile linux-2.6.29/drivers/Makefile ---- linux-2.6.29/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.29/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -42,6 +42,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-$(CONFIG_FUSION) += message/ - obj-$(CONFIG_FIREWIRE) += firewire/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.30.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.30.patch deleted file mode 100644 index b26ddd2..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.30.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.30/Documentation/dontdiff linux-2.6.30/drivers/Makefile linux-2.6.30/drivers/Makefile ---- linux-2.6.30/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.30/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -41,6 +41,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-y += net/ - obj-$(CONFIG_ATM) += atm/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.31.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.31.patch deleted file mode 100644 index 09da54d..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.31.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.31/Documentation/dontdiff linux-2.6.31/drivers/Makefile linux-2.6.31/drivers/Makefile ---- linux-2.6.31/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.31/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -41,6 +41,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-y += net/ - obj-$(CONFIG_ATM) += atm/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.32.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.32.patch deleted file mode 100644 index 29f7ac2..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.32.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.32/Documentation/dontdiff linux-2.6.32/drivers/Makefile linux-2.6.32/drivers/Makefile ---- linux-2.6.32/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.32/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -41,6 +41,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-y += net/ - obj-$(CONFIG_ATM) += atm/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.33.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.33.patch deleted file mode 100644 index 1b37f4a..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.33.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.33/Documentation/dontdiff linux-2.6.33/drivers/Makefile linux-2.6.33/drivers/Makefile ---- linux-2.6.33/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.33/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -41,6 +41,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-y += net/ - obj-$(CONFIG_ATM) += atm/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.34.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.34.patch deleted file mode 100644 index 060a735..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.34.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upkr -X linux-2.6.34/Documentation/dontdiff linux-2.6.34/drivers/Makefile linux-2.6.34/drivers/Makefile ---- linux-2.6.34/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.34/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 -@@ -43,6 +43,7 @@ obj-$(CONFIG_ATM) += atm/ - obj-y += macintosh/ - obj-$(CONFIG_IDE) += ide/ - obj-$(CONFIG_SCSI) += scsi/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_ATA) += ata/ - obj-y += net/ - obj-$(CONFIG_ATM) += atm/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.35.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.35.patch deleted file mode 100644 index f063f7e..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.35.patch +++ /dev/null @@ -1,8 +0,0 @@ -diff -upkr -X linux-2.6.35/Documentation/dontdiff linux-2.6.35/drivers/Makefile linux-2.6.35/drivers/Makefile ---- linux-2.6.35/drivers/Makefile.orig 2010-10-16 15:40:04.000000000 +0200 -+++ linux-2.6.35/drivers/Makefile 2010-10-16 15:40:20.000000000 +0200 -@@ -113,3 +113,4 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.36.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.36.patch deleted file mode 100644 index c0e5b6a..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.36.patch +++ /dev/null @@ -1,8 +0,0 @@ -diff -upkr -X linux-2.6.36/Documentation/dontdiff linux-2.6.36/drivers/Makefile linux-2.6.36/drivers/Makefile ---- linux-2.6.36/drivers/Makefile.orig 2010-10-16 15:40:04.000000000 +0200 -+++ linux-2.6.36/drivers/Makefile 2010-10-16 15:40:20.000000000 +0200 -@@ -113,3 +113,4 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.37.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.37.patch deleted file mode 100644 index b416623..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.37.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index f3ebb30..a9b3c06 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -115,3 +115,4 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.38.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.38.patch deleted file mode 100644 index c51f861..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.38.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index b423bb1..f780114 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -115,5 +115,6 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.39.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.39.patch deleted file mode 100644 index c51f861..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.39.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index b423bb1..f780114 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -115,5 +115,6 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.7.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.7.patch deleted file mode 100644 index b9b7192..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.7.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Makefile 2004-08-18 13:20:55.434402848 +0400 -+++ Makefile.scsi 2004-08-13 18:01:13.000000000 +0400 -@@ -81,6 +81,7 @@ obj-$(CONFIG_SCSI_QLOGIC_ISP) += qlogici - obj-$(CONFIG_SCSI_QLOGIC_FC) += qlogicfc.o - obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o - obj-$(CONFIG_SCSI_QLA2XXX) += qla2xxx/ -+obj-$(CONFIG_SCST) += scsi_tgt/ - obj-$(CONFIG_SCSI_PAS16) += pas16.o - obj-$(CONFIG_SCSI_SEAGATE) += seagate.o - obj-$(CONFIG_SCSI_FD_8xx) += seagate.o diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.0.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.0.patch deleted file mode 100644 index c51f861..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.0.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index b423bb1..f780114 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -115,5 +115,6 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.1.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.1.patch deleted file mode 100644 index c51f861..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.1.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index b423bb1..f780114 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -115,5 +115,6 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.2.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.2.patch deleted file mode 100644 index c51f861..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.2.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index b423bb1..f780114 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -115,5 +115,6 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.3.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.3.patch deleted file mode 100644 index 479746f..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.3.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index c07be02..615d036 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -120,6 +120,7 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ - diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.4.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.4.patch deleted file mode 100644 index 479746f..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index c07be02..615d036 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -120,6 +120,7 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ - diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.5.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.5.patch deleted file mode 100644 index 479746f..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.5.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index c07be02..615d036 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -120,6 +120,7 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ - diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-3.6.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-3.6.patch deleted file mode 100644 index 479746f..0000000 --- a/scst/kernel/in-tree/Makefile.drivers.Linux-3.6.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/drivers/Makefile b/drivers/Makefile -index c07be02..615d036 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -120,6 +120,7 @@ obj-$(CONFIG_VLYNQ) += vlynq/ - obj-$(CONFIG_STAGING) += staging/ - obj-y += platform/ - obj-y += ieee802154/ -+obj-$(CONFIG_SCST) += scst/ - #common clk code - obj-y += clk/ - diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.23 b/scst/kernel/in-tree/Makefile.scst-2.6.23 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.23 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.24 b/scst/kernel/in-tree/Makefile.scst-2.6.24 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.24 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.25 b/scst/kernel/in-tree/Makefile.scst-2.6.25 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.25 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.26 b/scst/kernel/in-tree/Makefile.scst-2.6.26 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.26 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.27 b/scst/kernel/in-tree/Makefile.scst-2.6.27 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.27 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.28 b/scst/kernel/in-tree/Makefile.scst-2.6.28 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.28 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.29 b/scst/kernel/in-tree/Makefile.scst-2.6.29 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.29 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.30 b/scst/kernel/in-tree/Makefile.scst-2.6.30 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.30 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.31 b/scst/kernel/in-tree/Makefile.scst-2.6.31 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.31 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ diff --git a/scst/kernel/in-tree/Makefile.scst-2.6.32 b/scst/kernel/in-tree/Makefile.scst-2.6.32 deleted file mode 100644 index 86b1c88..0000000 --- a/scst/kernel/in-tree/Makefile.scst-2.6.32 +++ /dev/null @@ -1,16 +0,0 @@ -ccflags-y += -Wno-unused-parameter - -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o - -obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ srpt/ scst_local/ |
|
From: Gleb C. <lna...@ya...> - 2025-09-30 09:13:49
|
Commit: 8180623 GitHub URL: https://github.com/SCST-project/scst/commit/81806233109247ba6a60926740fe04454124c39b Author: Gleb Chesnokov Date: 2025-09-30T12:13:22+03:00 Log Message: ----------- nightly build: Update kernel versions Another kernel versions update Modified Paths: -------------- .github/workflows/run_regression_tests.yaml | 29 ++++++++------- nightly/conf/nightly.conf | 29 ++++++++------- 2 files changed, 30 insertions(+), 28 deletions(-) =================================================================== diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index 5a7cfbf..2bf37f2 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -16,35 +16,36 @@ jobs: fail-fast: false matrix: version: [ - '6.16', - '6.15.9', + '6.17', + '6.16.9', + '6.15.11', '6.14.11', '6.13.12', - '6.12.41', + '6.12.49', '6.11.11', '6.10.14', '6.9.12', '6.8.12', '6.7.12', - '6.6.101', - '6.1.146', - '5.15.189', - '5.10.240', - '5.4.296', + '6.6.108', + '6.1.154', + '5.15.193', + '5.10.244', + '5.4.299', '4.19.325', '4.14.336', '4.9.337', '3.18.140', '3.10.108', - '6.12.0-55.22.1.el10_0^AlmaLinux^10.0', - '5.14.0-570.30.1.el9_6^AlmaLinux^9.6', + '6.12.0-55.34.1.el10_0^AlmaLinux^10.0', + '5.14.0-570.46.1.el9_6^AlmaLinux^9.6', '5.14.0-503.40.1.el9_5^AlmaLinux^9.5', '5.14.0-427.42.1.el9_4^AlmaLinux^9.4', '5.14.0-362.24.1.el9_3^AlmaLinux^9.3', '5.14.0-284.30.1.el9_2^AlmaLinux^9.2', '5.14.0-162.23.1.el9_1^AlmaLinux^9.1', '5.14.0-70.30.1.el9_0^AlmaLinux^9.0', - '4.18.0-553.53.1.el8_10^AlmaLinux^8.10', + '4.18.0-553.76.1.el8_10^AlmaLinux^8.10', '4.18.0-513.24.1.el8_9^AlmaLinux^8.9', '4.18.0-477.13.1.el8_8^AlmaLinux^8.8', '4.18.0-425.19.2.el8_7^AlmaLinux^8.7', @@ -54,9 +55,9 @@ jobs: '4.18.0-240.22.1.el8_3^AlmaLinux^8.3', '3.10.0-1160.118.1.el7^CentOS^7.9.2009', '3.10.0-862.14.4.el7^CentOS^7.5.1804', - '6.12.0-101.33.4.3.el10uek^UEK^10', - '5.15.0-310.184.5.3.el9uek^UEK^9', - '5.4.17-2136.345.5.3.el8uek^UEK^8', + '6.12.0-103.40.4.3.el10uek^UEK^10', + '5.15.0-312.187.5.3.el9uek^UEK^9', + '5.4.17-2136.347.6.3.el8uek^UEK^8', '4.14.35-2047.543.3.1.el7uek^UEK^7', '4.1.12-124.93.1.el7uek^UEK^7', '4.1.12-124.48.6.el6uek^UEK^6' diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index ee93949..fb64e81 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,39 +3,40 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -6.16 \ -6.15.9-nc \ +6.17 \ +6.16.9-nc \ +6.15.11-nc \ 6.14.11-nc \ 6.13.12-nc \ -6.12.41-nc \ +6.12.49-nc \ 6.11.11-nc \ 6.10.14-nc \ 6.9.12-nc \ 6.8.12-nc \ 6.7.12-nc \ -6.6.101-nc \ +6.6.108-nc \ 6.5.13-nc \ 6.4.16-nc \ 6.3.13-nc \ 6.2.16-nc \ -6.1.146-nc \ +6.1.154-nc \ 6.0.19-nc \ 5.19.17-nc \ 5.18.19-nc \ 5.17.15-nc \ 5.16.20-nc \ -5.15.189-nc \ +5.15.193-nc \ 5.14.21-nc \ 5.13.19-nc \ 5.12.19-nc \ 5.11.22-nc \ -5.10.240-nc \ +5.10.244-nc \ 5.9.16-nc \ 5.8.18-nc \ 5.7.19-nc \ 5.6.19-nc \ 5.5.19-nc \ -5.4.296-nc \ +5.4.299-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ @@ -71,15 +72,15 @@ ABT_KERNELS=" \ 3.12.74-nc \ 3.11.10-nc \ 3.10.108-nc \ -6.12.0-55.22.1.el10_0^AlmaLinux^10.0-nc \ -5.14.0-570.30.1.el9_6^AlmaLinux^9.6-nc \ +6.12.0-55.34.1.el10_0^AlmaLinux^10.0-nc \ +5.14.0-570.46.1.el9_6^AlmaLinux^9.6-nc \ 5.14.0-503.40.1.el9_5^AlmaLinux^9.5-nc \ 5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \ 5.14.0-362.24.1.el9_3^AlmaLinux^9.3-nc \ 5.14.0-284.30.1.el9_2^AlmaLinux^9.2-nc \ 5.14.0-162.23.1.el9_1^AlmaLinux^9.1-nc \ 5.14.0-70.30.1.el9_0^AlmaLinux^9.0-nc \ -4.18.0-553.53.1.el8_10^AlmaLinux^8.10-nc \ +4.18.0-553.76.1.el8_10^AlmaLinux^8.10-nc \ 4.18.0-513.24.1.el8_9^AlmaLinux^8.9-nc \ 4.18.0-477.13.1.el8_8^AlmaLinux^8.8-nc \ 4.18.0-425.19.2.el8_7^AlmaLinux^8.7-nc \ @@ -95,9 +96,9 @@ ABT_KERNELS=" \ 3.10.0-1062.18.1.el7^CentOS^7.7.1908-nc \ 3.10.0-957.27.2.el7^CentOS^7.6.1810-nc \ 3.10.0-862.14.4.el7^CentOS^7.5.1804-nc \ -6.12.0-101.33.4.3.el10uek^UEK^10-nc \ -5.15.0-310.184.5.3.el9uek^UEK^9-nc \ -5.4.17-2136.345.5.3.el8uek^UEK^8-nc \ +6.12.0-103.40.4.3.el10uek^UEK^10-nc \ +5.15.0-312.187.5.3.el9uek^UEK^9-nc \ +5.4.17-2136.347.6.3.el8uek^UEK^8-nc \ 4.14.35-2047.543.3.1.el7uek^UEK^7-nc \ 4.1.12-124.93.1.el7uek^UEK^7-nc \ 4.1.12-124.48.6.el6uek^UEK^6-nc \ |
|
From: Gleb C. <lna...@ya...> - 2025-09-23 10:26:48
|
Commit: 420b064 GitHub URL: https://github.com/SCST-project/scst/commit/420b06472b3944be85ecb2f498c203d0f2b1d222 Author: Gleb Chesnokov Date: 2025-09-23T13:24:49+03:00 Log Message: ----------- scst_event: Fix multiple checkpatch warnings This patch does not change any functionality. Modified Paths: -------------- scst/src/scst_event.c | 313 +++++++-------- 1 file changed, 139 insertions(+), 174 deletions(-) =================================================================== diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c index a36c667..857155d 100644 --- a/scst/src/scst_event.c +++ b/scst/src/scst_event.c @@ -38,8 +38,8 @@ static struct class *scst_event_sysfs_class; static int scst_event_major; #define SCST_MAX_EVENTS 2048 -#define SCST_MAX_PAYLOAD (3*1024) -#define SCST_DEFAULT_EVENT_TIMEOUT (60*HZ) +#define SCST_MAX_PAYLOAD (3 * 1024) +#define SCST_DEFAULT_EVENT_TIMEOUT (60 * HZ) struct scst_event_priv { struct list_head privs_list_entry; @@ -69,15 +69,13 @@ static LIST_HEAD(scst_event_privs_list); * - issuer_name "*" - any issuer name * - payload_len 0 - any payload */ -static bool scst_event_cmp(const struct scst_event *e1_wild, - const struct scst_event *e2) +static bool scst_event_cmp(const struct scst_event *e1_wild, const struct scst_event *e2) { int res = false; TRACE_ENTRY(); - if ((e1_wild->event_code != e2->event_code) && - (e1_wild->event_code != 0)) + if (e1_wild->event_code != e2->event_code && e1_wild->event_code != 0) goto out; if ((strcmp(e1_wild->issuer_name, e2->issuer_name) != 0) && @@ -87,7 +85,7 @@ static bool scst_event_cmp(const struct scst_event *e1_wild, if (e1_wild->payload_len == 0) goto out_true; - if ((e1_wild->payload_len != e2->payload_len) || + if (e1_wild->payload_len != e2->payload_len || (memcmp(e1_wild->payload, e2->payload, e1_wild->payload_len) != 0)) goto out; @@ -101,14 +99,14 @@ out: static void scst_event_timeout_fn(struct work_struct *work) { - struct scst_event_entry *event_entry = container_of(work, - struct scst_event_entry, event_timeout_work.work); + struct scst_event_entry *event_entry = container_of(work, struct scst_event_entry, + event_timeout_work.work); TRACE_ENTRY(); TRACE_MGMT_DBG("Timeout of event %d (issuer %s, id %u, entry %p)", - event_entry->event.event_code, event_entry->event.issuer_name, - event_entry->event.event_id, event_entry); + event_entry->event.event_code, event_entry->event.issuer_name, + event_entry->event.event_id, event_entry); mutex_lock(&scst_event_mutex); @@ -132,11 +130,10 @@ static void scst_event_timeout_fn(struct work_struct *work) out: TRACE_EXIT(); - return; } static int scst_clone_event(const struct scst_event_entry *orig_entry, - struct scst_event_entry **new_event_entry) + struct scst_event_entry **new_event_entry) { int res = 0; const struct scst_event *event = &orig_entry->event; @@ -146,10 +143,9 @@ static int scst_clone_event(const struct scst_event_entry *orig_entry, TRACE_ENTRY(); event_entry = kzalloc(event_entry_len, GFP_KERNEL); - if (event_entry == NULL) { - PRINT_ERROR("Unable to clone event entry (size %d, event %d, " - "issuer %s", event_entry_len, event->event_code, - event->issuer_name); + if (!event_entry) { + PRINT_ERROR("Unable to clone event entry (size %d, event %d, issuer %s", + event_entry_len, event->event_code, event->issuer_name); res = -ENOMEM; goto out; } @@ -158,7 +154,7 @@ static int scst_clone_event(const struct scst_event_entry *orig_entry, memcpy(&event_entry->event, event, sizeof(*event) + event->payload_len); - WARN_ON(orig_entry->event_notify_fn != NULL); + WARN_ON(orig_entry->event_notify_fn); *new_event_entry = event_entry; @@ -181,55 +177,54 @@ static void __scst_event_queue(struct scst_event_entry *event_entry) mutex_lock(&scst_event_mutex); list_for_each_entry(priv, &scst_event_privs_list, privs_list_entry) { - list_for_each_entry(allowed_entry, &priv->allowed_events_list, - events_list_entry) { + list_for_each_entry(allowed_entry, &priv->allowed_events_list, events_list_entry) { if (scst_event_cmp(&allowed_entry->event, event)) { struct scst_event_entry *new_event_entry; if (priv->queued_events_cnt >= SCST_MAX_EVENTS) { - PRINT_ERROR("Too many queued events %d, " - "event %d, issuer %s is lost.", - priv->queued_events_cnt, - event->event_code, - event->issuer_name); + PRINT_ERROR("Too many queued events %d, event %d, issuer %s is lost.", + priv->queued_events_cnt, event->event_code, + event->issuer_name); rc = -EMFILE; break; } - if (!queued) + if (!queued) { new_event_entry = event_entry; - else if (event_entry->event_notify_fn == NULL) { + } else if (!event_entry->event_notify_fn) { rc = scst_clone_event(event_entry, &new_event_entry); if (rc != 0) goto done; } else { - PRINT_WARNING("Event %d can be queued only once, " - "dublicated receiver pid %d will miss it!", - event->event_code, priv->owner_pid); + PRINT_WARNING("Event %d can be queued only once, dublicated receiver pid %d will miss it!", + event->event_code, priv->owner_pid); break; } INIT_DELAYED_WORK(&new_event_entry->event_timeout_work, scst_event_timeout_fn); - if (new_event_entry->event_notify_fn != NULL) { - new_event_entry->event.event_id = atomic_inc_return(&base_event_id); + if (new_event_entry->event_notify_fn) { + new_event_entry->event.event_id = + atomic_inc_return(&base_event_id); if (new_event_entry->event_timeout == 0) - new_event_entry->event_timeout = SCST_DEFAULT_EVENT_TIMEOUT; + new_event_entry->event_timeout = + SCST_DEFAULT_EVENT_TIMEOUT; - queue_delayed_work(scst_event_wq, &new_event_entry->event_timeout_work, + queue_delayed_work(scst_event_wq, + &new_event_entry->event_timeout_work, new_event_entry->event_timeout); } list_add_tail(&new_event_entry->events_list_entry, - &priv->queued_events_list); + &priv->queued_events_list); priv->queued_events_cnt++; new_event_entry->pqueued_events_cnt = &priv->queued_events_cnt; queued = true; - TRACE_DBG("event %d queued (issuer %s, id %u, " - "entry %p)", new_event_entry->event.event_code, - new_event_entry->event.issuer_name, - new_event_entry->event.event_id, new_event_entry); + TRACE_DBG("event %d queued (issuer %s, id %u, entry %p)", + new_event_entry->event.event_code, + new_event_entry->event.issuer_name, + new_event_entry->event.event_id, new_event_entry); wake_up_all(&priv->queued_events_waitQ); break; @@ -240,13 +235,13 @@ done: mutex_unlock(&scst_event_mutex); if (!queued) { - if (event_entry->event_notify_fn != NULL) { + if (event_entry->event_notify_fn) { if (rc == 0) rc = -ENOENT; TRACE_DBG("Calling notify_fn of event_entry %p (rc %d)", - event_entry, rc); + event_entry, rc); event_entry->event_notify_fn(&event_entry->event, - event_entry->notify_fn_priv, rc); + event_entry->notify_fn_priv, rc); } TRACE_MEM("Freeing orphan event entry %p", event_entry); @@ -254,25 +249,22 @@ done: } TRACE_EXIT(); - return; } static void scst_event_queue_work_fn(struct work_struct *work) { - struct scst_event_entry *e = container_of(work, - struct scst_event_entry, scst_event_queue_work); + struct scst_event_entry *e = container_of(work, struct scst_event_entry, + scst_event_queue_work); TRACE_ENTRY(); __scst_event_queue(e); TRACE_EXIT(); - return; } /* Can be called on IRQ with any lock held */ -void scst_event_queue(uint32_t event_code, const char *issuer_name, - struct scst_event_entry *e) +void scst_event_queue(uint32_t event_code, const char *issuer_name, struct scst_event_entry *e) { TRACE_ENTRY(); @@ -286,7 +278,6 @@ void scst_event_queue(uint32_t event_code, const char *issuer_name, queue_work(scst_event_wq, &e->scst_event_queue_work); TRACE_EXIT(); - return; } EXPORT_SYMBOL_GPL(scst_event_queue); @@ -302,17 +293,16 @@ int scst_event_queue_lun_not_found(const struct scst_cmd *cmd) event_entry_len = sizeof(*event_entry) + sizeof(*payload); event_entry = kzalloc(event_entry_len, GFP_ATOMIC); - if (event_entry == NULL) { - PRINT_ERROR("Unable to allocate event (size %d). LUN not found " - "event is lost (LUN %lld, initiator %s, target %s)!", - event_entry_len, (unsigned long long)cmd->lun, - cmd->sess->initiator_name, cmd->tgt->tgt_name); + if (!event_entry) { + PRINT_ERROR("Unable to allocate event (size %d). LUN not found event is lost (LUN %lld, initiator %s, target %s)!", + event_entry_len, (unsigned long long)cmd->lun, + cmd->sess->initiator_name, cmd->tgt->tgt_name); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event = &event_entry->event; @@ -325,16 +315,14 @@ int scst_event_queue_lun_not_found(const struct scst_cmd *cmd) strscpy(payload->target_name, cmd->tgt->tgt_name, sizeof(payload->target_name)); - scst_event_queue(SCST_EVENT_LUN_NOT_FOUND, - SCST_EVENT_SCST_CORE_ISSUER, event_entry); + scst_event_queue(SCST_EVENT_LUN_NOT_FOUND, SCST_EVENT_SCST_CORE_ISSUER, event_entry); out: TRACE_EXIT_RES(res); return res; } -int scst_event_queue_negative_luns_inquiry(const struct scst_tgt *tgt, - const char *initiator_name) +int scst_event_queue_negative_luns_inquiry(const struct scst_tgt *tgt, const char *initiator_name) { int res = 0, event_entry_len; struct scst_event_entry *event_entry; @@ -345,16 +333,15 @@ int scst_event_queue_negative_luns_inquiry(const struct scst_tgt *tgt, event_entry_len = sizeof(*event_entry) + sizeof(*payload); event_entry = kzalloc(event_entry_len, GFP_ATOMIC); - if (event_entry == NULL) { - PRINT_ERROR("Unable to allocate event (size %d). NEGATIVE LUNS " - "INQUIRY event is lost (initiator %s, target %s)!", - event_entry_len, initiator_name, tgt->tgt_name); + if (!event_entry) { + PRINT_ERROR("Unable to allocate event (size %d). NEGATIVE LUNS INQUIRY event is lost (initiator %s, target %s)!", + event_entry_len, initiator_name, tgt->tgt_name); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event = &event_entry->event; @@ -366,8 +353,8 @@ int scst_event_queue_negative_luns_inquiry(const struct scst_tgt *tgt, strscpy(payload->target_name, tgt->tgt_name, sizeof(payload->target_name)); - scst_event_queue(SCST_EVENT_NEGATIVE_LUNS_INQUIRY, - SCST_EVENT_SCST_CORE_ISSUER, event_entry); + scst_event_queue(SCST_EVENT_NEGATIVE_LUNS_INQUIRY, SCST_EVENT_SCST_CORE_ISSUER, + event_entry); out: TRACE_EXIT_RES(res); @@ -386,16 +373,15 @@ int scst_event_queue_ext_blocking_done(struct scst_device *dev, void *data, int event_entry_len = sizeof(*event_entry) + sizeof(*payload) + len; event_entry = kzalloc(event_entry_len, GFP_ATOMIC); - if (event_entry == NULL) { - PRINT_CRIT_ERROR("Unable to allocate event. Ext blocking " - "done event is lost (device %s, size %zd)!", dev->virt_name, - sizeof(*event_entry) + sizeof(*payload) + len); + if (!event_entry) { + PRINT_CRIT_ERROR("Unable to allocate event. Ext blocking done event is lost (device %s, size %zd)!", + dev->virt_name, sizeof(*event_entry) + sizeof(*payload) + len); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event = &event_entry->event; @@ -406,8 +392,7 @@ int scst_event_queue_ext_blocking_done(struct scst_device *dev, void *data, int if (len > 0) memcpy(payload->data, data, len); - scst_event_queue(SCST_EVENT_EXT_BLOCKING_DONE, - SCST_EVENT_SCST_CORE_ISSUER, event_entry); + scst_event_queue(SCST_EVENT_EXT_BLOCKING_DONE, SCST_EVENT_SCST_CORE_ISSUER, event_entry); res = 0; out: @@ -427,15 +412,15 @@ int scst_event_queue_tm_fn_received(struct scst_mgmt_cmd *mcmd) event_entry_len = sizeof(*event_entry) + sizeof(*payload); event_entry = kzalloc(event_entry_len, GFP_KERNEL); - if (event_entry == NULL) { - PRINT_CRIT_ERROR("Unable to allocate event (size %d). External " - "TM fn received event is lost!", event_entry_len); + if (!event_entry) { + PRINT_CRIT_ERROR("Unable to allocate event (size %d). External TM fn received event is lost!", + event_entry_len); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event = &event_entry->event; @@ -444,7 +429,7 @@ int scst_event_queue_tm_fn_received(struct scst_mgmt_cmd *mcmd) payload->fn = mcmd->fn; payload->lun = mcmd->lun; - if (mcmd->mcmd_tgt_dev != NULL) + if (mcmd->mcmd_tgt_dev) strscpy(payload->device_name, mcmd->mcmd_tgt_dev->dev->virt_name, sizeof(payload->device_name)); strscpy(payload->initiator_name, mcmd->sess->initiator_name, @@ -453,15 +438,14 @@ int scst_event_queue_tm_fn_received(struct scst_mgmt_cmd *mcmd) sizeof(payload->target_name)); strscpy(payload->session_sysfs_name, mcmd->sess->sess_name, sizeof(payload->session_sysfs_name)); - if (mcmd->cmd_to_abort != NULL) { + if (mcmd->cmd_to_abort) { payload->cmd_to_abort_tag = mcmd->cmd_to_abort->tag; memcpy(payload->cdb, mcmd->cmd_to_abort->cdb, min_t(u32, mcmd->cmd_to_abort->cdb_len, sizeof(payload->cdb))); } - scst_event_queue(SCST_EVENT_TM_FN_RECEIVED, - SCST_EVENT_SCST_CORE_ISSUER, event_entry); + scst_event_queue(SCST_EVENT_TM_FN_RECEIVED, SCST_EVENT_SCST_CORE_ISSUER, event_entry); out: TRACE_EXIT_RES(res); @@ -480,16 +464,15 @@ int scst_event_queue_reg_vdev(const char *dev_name) event_entry_len = sizeof(*event_entry) + sizeof(*payload); event_entry = kzalloc(event_entry_len, GFP_ATOMIC); - if (event_entry == NULL) { - PRINT_ERROR("Unable to allocate event (size %d). Virtual " - "device registration event is lost (device name %s)!", - event_entry_len, dev_name); + if (!event_entry) { + PRINT_ERROR("Unable to allocate event (size %d). Virtual device registration event is lost (device name %s)!", + event_entry_len, dev_name); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event = &event_entry->event; @@ -499,8 +482,7 @@ int scst_event_queue_reg_vdev(const char *dev_name) strscpy(payload->device_name, dev_name, sizeof(payload->device_name)); - scst_event_queue(SCST_EVENT_REG_VIRT_DEV, - SCST_EVENT_SCST_CORE_ISSUER, event_entry); + scst_event_queue(SCST_EVENT_REG_VIRT_DEV, SCST_EVENT_SCST_CORE_ISSUER, event_entry); out: TRACE_EXIT_RES(res); @@ -515,7 +497,7 @@ static void scst_release_event_entry(struct scst_event_entry *e) TRACE_DBG("Deleting event entry %p", e); list_del(&e->events_list_entry); - if (e->event_notify_fn != NULL) { + if (e->event_notify_fn) { mutex_unlock(&scst_event_mutex); cancel_delayed_work_sync(&e->event_timeout_work); @@ -530,7 +512,6 @@ static void scst_release_event_entry(struct scst_event_entry *e) kfree(e); TRACE_EXIT(); - return; } static int scst_event_release(struct inode *inode, struct file *file) @@ -543,7 +524,7 @@ static int scst_event_release(struct inode *inode, struct file *file) mutex_lock(&scst_event_mutex); priv = file->private_data; - if (priv == NULL) { + if (!priv) { mutex_unlock(&scst_event_mutex); goto out; } @@ -558,8 +539,7 @@ static int scst_event_release(struct inode *inode, struct file *file) priv->going_to_exit = 1; wake_up_all(&priv->queued_events_waitQ); - list_for_each_entry_safe(e, et, &priv->allowed_events_list, - events_list_entry) { + list_for_each_entry_safe(e, et, &priv->allowed_events_list, events_list_entry) { TRACE_MEM("Deleting allowed event entry %p", e); list_del(&e->events_list_entry); kfree(e); @@ -567,13 +547,11 @@ static int scst_event_release(struct inode *inode, struct file *file) mutex_lock(&scst_event_mutex); /* to sync with timeout_work */ while (!list_empty(&priv->queued_events_list)) { - e = list_entry(priv->queued_events_list.next, - typeof(*e), events_list_entry); + e = list_entry(priv->queued_events_list.next, typeof(*e), events_list_entry); scst_release_event_entry(e); } while (!list_empty(&priv->processing_events_list)) { - e = list_entry(priv->processing_events_list.next, - typeof(*e), events_list_entry); + e = list_entry(priv->processing_events_list.next, typeof(*e), events_list_entry); scst_release_event_entry(e); } mutex_unlock(&scst_event_mutex); @@ -594,7 +572,7 @@ out: * plain event, because this entry can then be queued in some list. */ static int scst_event_get_event_from_user(struct scst_event_user __user *arg, - struct scst_event_entry **out_event_entry) + struct scst_event_entry **out_event_entry) { int res, rc; int event_entry_len, event_len; @@ -611,8 +589,8 @@ static int scst_event_get_event_from_user(struct scst_event_user __user *arg, } if (payload_len > SCST_MAX_PAYLOAD) { - PRINT_ERROR("Payload len %d is too big (max %d)", payload_len, - SCST_MAX_PAYLOAD); + PRINT_ERROR("Payload len %d is too big (max %d)", + payload_len, SCST_MAX_PAYLOAD); res = -EINVAL; goto out; } @@ -622,9 +600,9 @@ static int scst_event_get_event_from_user(struct scst_event_user __user *arg, event_entry_len = sizeof(*event_entry) + payload_len; event_entry = kzalloc(event_entry_len, GFP_KERNEL); - if (event_entry == NULL) { + if (!event_entry) { PRINT_ERROR("Unable to allocate event entry (size %d)", - event_entry_len); + event_entry_len); res = -ENOMEM; goto out; } @@ -644,7 +622,7 @@ static int scst_event_get_event_from_user(struct scst_event_user __user *arg, /* payload_len has been recopied, so recheck it. */ if (event->payload_len != payload_len) { PRINT_ERROR("Payload len %d changed while being read: %d", - event->payload_len, payload_len); + event->payload_len, payload_len); res = -EINVAL; goto out_free; } @@ -652,7 +630,7 @@ static int scst_event_get_event_from_user(struct scst_event_user __user *arg, event->issuer_name[sizeof(event->issuer_name) - 1] = '\0'; TRACE_DBG("user event: event_code %d, issuer_name %s", - event->event_code, event->issuer_name); + event->event_code, event->issuer_name); *out_event_entry = event_entry; @@ -680,9 +658,8 @@ static int scst_event_allow_event(struct scst_event_priv *priv, void __user *arg list_for_each_entry(e, &priv->allowed_events_list, events_list_entry) { if (scst_event_cmp(&event_entry->event, &e->event)) { - PRINT_WARNING("Allowed event (event_code %d, " - "issuer_name %s) already exists", - e->event.event_code, e->event.issuer_name); + PRINT_WARNING("Allowed event (event_code %d, issuer_name %s) already exists", + e->event.event_code, e->event.issuer_name); res = -EEXIST; goto out_free; } @@ -690,13 +667,12 @@ static int scst_event_allow_event(struct scst_event_priv *priv, void __user *arg if (priv->allowed_events_cnt >= SCST_MAX_EVENTS) { PRINT_ERROR("Too many allowed events %d", - priv->allowed_events_cnt); + priv->allowed_events_cnt); res = -EMFILE; goto out_free; } - list_add_tail(&event_entry->events_list_entry, - &priv->allowed_events_list); + list_add_tail(&event_entry->events_list_entry, &priv->allowed_events_list); priv->allowed_events_cnt++; res = 0; @@ -711,8 +687,7 @@ out_free: } /* scst_event_mutex supposed to be held */ -static int scst_event_disallow_event(struct scst_event_priv *priv, - void __user *arg) +static int scst_event_disallow_event(struct scst_event_priv *priv, void __user *arg) { int res; struct scst_event_entry *event_entry, *e, *et; @@ -725,12 +700,10 @@ static int scst_event_disallow_event(struct scst_event_priv *priv, goto out; /* For wildcard events we might delete several events */ - list_for_each_entry_safe(e, et, &priv->allowed_events_list, - events_list_entry) { + list_for_each_entry_safe(e, et, &priv->allowed_events_list, events_list_entry) { if (scst_event_cmp(&event_entry->event, &e->event)) { - PRINT_INFO("Deleting allowed event (event_code %d, " - "issuer_name %s)", e->event.event_code, - e->event.issuer_name); + PRINT_INFO("Deleting allowed event (event_code %d, issuer_name %s)", + e->event.event_code, e->event.issuer_name); TRACE_MEM("Deleting event entry %p", e); list_del(&e->events_list_entry); kfree(e); @@ -739,12 +712,12 @@ static int scst_event_disallow_event(struct scst_event_priv *priv, } } if (!found) { - PRINT_WARNING("Allowed event (event_code %d, issuer_name %s) " - "not found", event_entry->event.event_code, - event_entry->event.issuer_name); + PRINT_WARNING("Allowed event (event_code %d, issuer_name %s) not found", + event_entry->event.event_code, event_entry->event.issuer_name); res = -ENOENT; - } else + } else { res = 0; + } TRACE_MEM("Deleting event entry %p", e); kfree(event_entry); @@ -755,8 +728,7 @@ out: } /* scst_event_mutex supposed to be held. Might drop it, then get back. */ -static int scst_event_user_next_event(struct scst_event_priv *priv, - void __user *arg) +static int scst_event_user_next_event(struct scst_event_priv *priv, void __user *arg) { int res, rc; int32_t max_event_size, needed_size; @@ -775,13 +747,14 @@ static int scst_event_user_next_event(struct scst_event_priv *priv, while (list_empty(&priv->queued_events_list)) { mutex_unlock(&scst_event_mutex); wait_event_interruptible(priv->queued_events_waitQ, - (!list_empty(&priv->queued_events_list) || priv->going_to_exit || - !priv->blocking || signal_pending(current))); + (!list_empty(&priv->queued_events_list) || + priv->going_to_exit || !priv->blocking || + signal_pending(current))); mutex_lock(&scst_event_mutex); if (priv->going_to_exit || signal_pending(current)) { res = -EINTR; TRACE_DBG("Signal pending or going_to_exit (%d), returning", - priv->going_to_exit); + priv->going_to_exit); goto out; } else if (list_empty(&priv->queued_events_list) && !priv->blocking) { res = -EAGAIN; @@ -792,14 +765,14 @@ static int scst_event_user_next_event(struct scst_event_priv *priv, EXTRACHECKS_BUG_ON(list_empty(&priv->queued_events_list)); - event_entry = list_entry(priv->queued_events_list.next, - struct scst_event_entry, events_list_entry); + event_entry = list_entry(priv->queued_events_list.next, struct scst_event_entry, + events_list_entry); needed_size = sizeof(event_entry->event) + event_entry->event.payload_len; if (needed_size > max_event_size) { - TRACE_DBG("Too big event (size %d, max size %d)", needed_size, - max_event_size); + TRACE_DBG("Too big event (size %d, max size %d)", + needed_size, max_event_size); res = put_user(needed_size, (int32_t __user *)arg); if (res == 0) res = -ENOSPC; @@ -815,9 +788,8 @@ static int scst_event_user_next_event(struct scst_event_priv *priv, if (event_entry->event_notify_fn) { TRACE_DBG("Moving event entry %p to processing events list", - event_entry); - list_move_tail(&event_entry->events_list_entry, - &priv->processing_events_list); + event_entry); + list_move_tail(&event_entry->events_list_entry, &priv->processing_events_list); } else { TRACE_MEM("Deleting event entry %p", event_entry); list_del(&event_entry->events_list_entry); @@ -834,8 +806,7 @@ out: } /* scst_event_mutex supposed to be held. Might drop it, then get back. */ -static int scst_event_user_notify_done(struct scst_event_priv *priv, - void __user *arg) +static int scst_event_user_notify_done(struct scst_event_priv *priv, void __user *arg) { int res, rc; struct scst_event_notify_done n; @@ -871,7 +842,7 @@ static int scst_event_user_notify_done(struct scst_event_priv *priv, cancel_delayed_work_sync(&e->event_timeout_work); - if (e->event_notify_fn != NULL) { + if (e->event_notify_fn) { TRACE_DBG("Calling notify_fn of event_entry %p", e); e->event_notify_fn(&e->event, e->notify_fn_priv, n.status); } @@ -895,7 +866,7 @@ static int scst_event_create_priv(struct file *file) TRACE_ENTRY(); - EXTRACHECKS_BUG_ON(file->private_data != NULL); + EXTRACHECKS_BUG_ON(file->private_data); if (!try_module_get(THIS_MODULE)) { PRINT_ERROR("Fail to get module"); @@ -904,9 +875,9 @@ static int scst_event_create_priv(struct file *file) } priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (priv == NULL) { + if (!priv) { PRINT_ERROR("Unable to allocate priv (size %zd)", - sizeof(*priv)); + sizeof(*priv)); res = -ENOMEM; goto out_put; } @@ -919,10 +890,11 @@ static int scst_event_create_priv(struct file *file) INIT_LIST_HEAD(&priv->queued_events_list); INIT_LIST_HEAD(&priv->processing_events_list); if (file->f_flags & O_NONBLOCK) { - TRACE_DBG("%s", "Non-blocking operations"); + TRACE_DBG("Non-blocking operations"); priv->blocking = 0; - } else + } else { priv->blocking = 1; + } list_add_tail(&priv->privs_list_entry, &scst_event_privs_list); @@ -939,8 +911,7 @@ out_put: goto out; } -static long scst_event_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static long scst_event_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long res; struct scst_event_priv *priv; @@ -950,7 +921,7 @@ static long scst_event_ioctl(struct file *file, unsigned int cmd, mutex_lock(&scst_event_mutex); priv = file->private_data; - if (unlikely(priv == NULL)) { + if (unlikely(!priv)) { /* This is the first time we are here */ res = scst_event_create_priv(file); if (res != 0) @@ -969,22 +940,22 @@ static long scst_event_ioctl(struct file *file, unsigned int cmd, switch (cmd) { case SCST_EVENT_ALLOW_EVENT: - TRACE_DBG("%s", "ALLOW_EVENT"); + TRACE_DBG("ALLOW_EVENT"); res = scst_event_allow_event(priv, (void __user *)arg); break; case SCST_EVENT_DISALLOW_EVENT: - TRACE_DBG("%s", "DISALLOW_EVENT"); + TRACE_DBG("DISALLOW_EVENT"); res = scst_event_disallow_event(priv, (void __user *)arg); break; case SCST_EVENT_GET_NEXT_EVENT: - TRACE_DBG("%s", "GET_NEXT_EVENT"); + TRACE_DBG("GET_NEXT_EVENT"); res = scst_event_user_next_event(priv, (void __user *)arg); break; case SCST_EVENT_NOTIFY_DONE: - TRACE_DBG("%s", "NOTIFY_DONE"); + TRACE_DBG("NOTIFY_DONE"); res = scst_event_user_notify_done(priv, (void __user *)arg); break; @@ -1011,7 +982,7 @@ static __poll_t scst_event_poll(struct file *file, poll_table *wait) mutex_lock(&scst_event_mutex); priv = file->private_data; - if (unlikely(priv == NULL)) { + if (unlikely(!priv)) { PRINT_ERROR("At least one allowed event must be set"); res = EPOLLNVAL; goto out_unlock; @@ -1047,21 +1018,18 @@ out_unlock: #endif #ifdef CONFIG_EVENTS_WAIT_TEST -static void scst_event_test_notify_fn(struct scst_event *event, - void *priv, int status) +static void scst_event_test_notify_fn(struct scst_event *event, void *priv, int status) { TRACE_ENTRY(); - PRINT_INFO("Notification for event %u (id %d) received with status %d " - "(priv %p)", event->event_code, event->event_id, status, - priv); + PRINT_INFO("Notification for event %u (id %d) received with status %d (priv %p)", + event->event_code, event->event_id, status, priv); TRACE_EXIT(); - return; } -static ssize_t event_wait_test_store(struct kobject *kobj, - struct kobj_attribute *attr, const char *buf, size_t count) +static ssize_t event_wait_test_store(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count) { int res = 0, event_entry_len; struct scst_event_entry *event_entry; @@ -1070,18 +1038,18 @@ static ssize_t event_wait_test_store(struct kobject *kobj, event_entry_len = sizeof(*event_entry); event_entry = kzalloc(event_entry_len, GFP_KERNEL); - if (event_entry == NULL) { - PRINT_ERROR("Unable to allocate event (size %d). Test " - "event is lost!", event_entry_len); + if (!event_entry) { + PRINT_ERROR("Unable to allocate event (size %d). Test event is lost!", + event_entry_len); res = -ENOMEM; goto out; } - TRACE_MEM("event_entry %p (len %d) allocated", event_entry, - event_entry_len); + TRACE_MEM("event_entry %p (len %d) allocated", + event_entry, event_entry_len); event_entry->event_notify_fn = scst_event_test_notify_fn; - event_entry->event_timeout = 10*HZ; + event_entry->event_timeout = 10 * HZ; scst_event_queue(0x12345, SCST_EVENT_SCST_CORE_ISSUER, event_entry); @@ -1094,7 +1062,7 @@ out: } static struct kobj_attribute event_wait_test_attr = - __ATTR(event_wait_test, S_IWUSR, NULL, event_wait_test_store); + __ATTR(event_wait_test, 0200, NULL, event_wait_test_store); #endif /* #ifdef CONFIG_EVENTS_WAIT_TEST */ @@ -1141,10 +1109,8 @@ int scst_event_init(void) goto out_class; } - dev = device_create(scst_event_sysfs_class, NULL, - MKDEV(scst_event_major, 0), - NULL, - SCST_EVENT_NAME); + dev = device_create(scst_event_sysfs_class, NULL, MKDEV(scst_event_major, 0), NULL, + SCST_EVENT_NAME); if (IS_ERR(dev)) { res = PTR_ERR(dev); goto out_chrdev; @@ -1187,5 +1153,4 @@ void scst_event_exit(void) destroy_workqueue(scst_event_wq); TRACE_EXIT(); - return; } |
|
From: Gleb C. <lna...@ya...> - 2025-09-23 09:49:30
|
Commit: c38b254 GitHub URL: https://github.com/SCST-project/scst/commit/c38b254c7a33c4654ef3fb1e062ce05c30cca876 Author: Gleb Chesnokov Date: 2025-09-23T12:49:00+03:00 Log Message: ----------- scst_mem: Fix multiple checkpatch warnings This patch does not change any functionality. Modified Paths: -------------- scst/src/scst_mem.c | 497 +++++++-------- 1 file changed, 219 insertions(+), 278 deletions(-) =================================================================== diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 537b90c..a97ef84 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -116,7 +116,7 @@ void scst_sgv_pool_use_norm(struct scst_tgt_dev *tgt_dev) void scst_sgv_pool_use_norm_clust(struct scst_tgt_dev *tgt_dev) { - TRACE_MEM("%s", "Use clustering"); + TRACE_MEM("Use clustering"); tgt_dev->tgt_dev_gfp_mask = __GFP_NOWARN; if (!scst_force_global_sgv_pool) tgt_dev->pools = sgv_norm_clust_pool_per_cpu; @@ -127,7 +127,7 @@ void scst_sgv_pool_use_norm_clust(struct scst_tgt_dev *tgt_dev) void scst_sgv_pool_use_dma(struct scst_tgt_dev *tgt_dev) { - TRACE_MEM("%s", "Use ISA DMA memory"); + TRACE_MEM("Use ISA DMA memory"); tgt_dev->tgt_dev_gfp_mask = __GFP_NOWARN | GFP_DMA; if (!scst_force_global_sgv_pool) tgt_dev->pools = sgv_dma_pool_per_cpu; @@ -148,8 +148,7 @@ static void sgv_dtor_and_free(struct sgv_pool_obj *obj) obj->sg_count, obj->allocator_priv); } if (obj->sg_entries != obj->sg_entries_data) { - if (obj->trans_tbl != - (struct trans_tbl_ent *)obj->sg_entries_data) { + if (obj->trans_tbl != (struct trans_tbl_ent *)obj->sg_entries_data) { /* kfree() handles NULL parameter */ kfree(obj->trans_tbl); obj->trans_tbl = NULL; @@ -158,7 +157,6 @@ static void sgv_dtor_and_free(struct sgv_pool_obj *obj) } kmem_cache_free(pool->caches[obj->cache_num], obj); - return; } /* Must be called under sgv_pool_lock held */ @@ -175,7 +173,7 @@ static void __sgv_purge_from_cache(struct sgv_pool_obj *obj) struct sgv_pool *pool = obj->owner_pool; TRACE_MEM("Purging sgv obj %p from pool %p (new cached_entries %d)", - obj, pool, pool->cached_entries-1); + obj, pool, pool->cached_entries - 1); list_del(&obj->sorted_recycling_list_entry); list_del(&obj->recycling_list_entry); @@ -186,19 +184,16 @@ static void __sgv_purge_from_cache(struct sgv_pool_obj *obj) #ifndef CONFIG_SCST_NO_TOTAL_MEM_CHECKS atomic_sub(pages, &sgv_pages_total); #endif - - return; } /* Must be called under sgv_pool_lock held */ static bool sgv_purge_from_cache(struct sgv_pool_obj *obj, int min_interval, - unsigned long cur_time) + unsigned long cur_time) { EXTRACHECKS_BUG_ON(min_interval < 0); - TRACE_MEM("Checking if sgv obj %p should be purged (cur time %ld, " - "obj time %ld, time to purge %ld)", obj, cur_time, - obj->time_stamp, obj->time_stamp + min_interval); + TRACE_MEM("Checking if sgv obj %p should be purged (cur time %ld, obj time %ld, time to purge %ld)", + obj, cur_time, obj->time_stamp, obj->time_stamp + min_interval); if (time_after_eq(cur_time, (obj->time_stamp + min_interval))) { __sgv_purge_from_cache(obj); @@ -208,15 +203,15 @@ static bool sgv_purge_from_cache(struct sgv_pool_obj *obj, int min_interval, } /* No locks */ -static int sgv_shrink_pool(struct sgv_pool *pool, int nr, int min_interval, - unsigned long cur_time, int *out_freed) +static int sgv_shrink_pool(struct sgv_pool *pool, int nr, int min_interval, unsigned long cur_time, + int *out_freed) { int freed = 0; TRACE_ENTRY(); TRACE_MEM("Trying to shrink pool %p (nr %d, min_interval %d)", - pool, nr, min_interval); + pool, nr, min_interval); if (pool->purge_interval < 0) { TRACE_MEM("Not shrinkable pool %p, skipping", pool); @@ -231,9 +226,9 @@ static int sgv_shrink_pool(struct sgv_pool *pool, int nr, int min_interval, #else (atomic_read(&sgv_pages_total) > sgv_lo_wmk)) { #endif - struct sgv_pool_obj *obj = list_first_entry( - &pool->sorted_recycling_list, - struct sgv_pool_obj, sorted_recycling_list_entry); + struct sgv_pool_obj *obj = list_first_entry(&pool->sorted_recycling_list, + struct sgv_pool_obj, + sorted_recycling_list_entry); if (sgv_purge_from_cache(obj, min_interval, cur_time)) { int pages = obj->pages; @@ -241,19 +236,20 @@ static int sgv_shrink_pool(struct sgv_pool *pool, int nr, int min_interval, freed += pages; nr -= pages; - TRACE_MEM("%d pages purged from pool %p (nr left %d, " - "total freed %d)", pages, pool, nr, freed); + TRACE_MEM("%d pages purged from pool %p (nr left %d, total freed %d)", + pages, pool, nr, freed); spin_unlock_bh(&pool->sgv_pool_lock); sgv_dtor_and_free(obj); spin_lock_bh(&pool->sgv_pool_lock); - } else + } else { break; + } - if ((nr <= 0) || (freed >= MAX_PAGES_PER_POOL)) { + if (nr <= 0 || freed >= MAX_PAGES_PER_POOL) { if (freed >= MAX_PAGES_PER_POOL) - TRACE_MEM("%d pages purged from pool %p, " - "leaving", freed, pool); + TRACE_MEM("%d pages purged from pool %p, leaving", + freed, pool); break; } } @@ -276,8 +272,8 @@ static int __sgv_shrink(int nr, int min_interval, int *out_freed) TRACE_ENTRY(); - TRACE_MEM("Trying to shrink %d pages from all sgv pools " - "(min_interval %d)", nr, min_interval); + TRACE_MEM("Trying to shrink %d pages from all sgv pools (min_interval %d)", + nr, min_interval); while (prev_nr > nr && nr > 0) { prev_nr = nr; @@ -321,14 +317,12 @@ static unsigned long __sgv_can_be_shrunk(void) } #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) -static unsigned long sgv_can_be_shrunk(struct shrinker *shrinker, - struct shrink_control *sc) +static unsigned long sgv_can_be_shrunk(struct shrinker *shrinker, struct shrink_control *sc) { return __sgv_can_be_shrunk(); } -static unsigned long sgv_scan_shrink(struct shrinker *shrinker, - struct shrink_control *sc) +static unsigned long sgv_scan_shrink(struct shrinker *shrinker, struct shrink_control *sc) { int freed = 0; @@ -351,8 +345,9 @@ static int sgv_shrink(struct shrinker *shrinker, struct shrink_control *sc) if (nr > 0) { nr = __sgv_shrink(nr, SGV_MIN_SHRINK_INTERVAL, &freed); TRACE_MEM("Left %d", nr); - } else + } else { nr = __sgv_can_be_shrunk(); + } TRACE_EXIT_RES(nr); return nr; @@ -374,9 +369,9 @@ static void sgv_purge_work_fn(struct work_struct *work) pool->purge_work_scheduled = false; while (!list_empty(&pool->sorted_recycling_list)) { - struct sgv_pool_obj *obj = list_first_entry( - &pool->sorted_recycling_list, - struct sgv_pool_obj, sorted_recycling_list_entry); + struct sgv_pool_obj *obj = list_first_entry(&pool->sorted_recycling_list, + struct sgv_pool_obj, + sorted_recycling_list_entry); if (sgv_purge_from_cache(obj, pool->purge_interval, cur_time)) { spin_unlock_bh(&pool->sgv_pool_lock); @@ -388,11 +383,9 @@ static void sgv_purge_work_fn(struct work_struct *work) * too often. In the worst case we have shrinker * to reclaim buffers more quickly. */ - TRACE_MEM("Rescheduling purge work for pool %p (delay " - "%d HZ/%d sec)", pool, pool->purge_interval, - pool->purge_interval/HZ); - schedule_delayed_work(&pool->sgv_purge_work, - pool->purge_interval); + TRACE_MEM("Rescheduling purge work for pool %p (delay %d HZ/%d sec)", + pool, pool->purge_interval, pool->purge_interval / HZ); + schedule_delayed_work(&pool->sgv_purge_work, pool->purge_interval); pool->purge_work_scheduled = true; break; } @@ -403,7 +396,6 @@ static void sgv_purge_work_fn(struct work_struct *work) TRACE_MEM("Leaving purge work for pool %p", pool); TRACE_EXIT(); - return; } static int sgv_check_full_clustering(struct scatterlist *sg, int cur, int hint) @@ -419,7 +411,7 @@ static int sgv_check_full_clustering(struct scatterlist *sg, int cur, int hint) #if 0 TRACE_MEM("pfn_cur %ld, pfn_cur_next %ld, len_cur %d, full_page_cur %d", - pfn_cur, pfn_cur_next, len_cur, full_page_cur); + pfn_cur, pfn_cur_next, len_cur, full_page_cur); #endif /* check the hint first */ @@ -428,10 +420,10 @@ static int sgv_check_full_clustering(struct scatterlist *sg, int cur, int hint) pfn_next = pfn + (sg[i].length >> PAGE_SHIFT); full_page = (sg[i].length & (PAGE_SIZE - 1)) == 0; - if ((pfn == pfn_cur_next) && full_page_cur) + if (pfn == pfn_cur_next && full_page_cur) goto out_head; - if ((pfn_next == pfn_cur) && full_page) + if (pfn_next == pfn_cur && full_page) goto out_tail; } @@ -441,10 +433,10 @@ static int sgv_check_full_clustering(struct scatterlist *sg, int cur, int hint) pfn_next = pfn + (sg[i].length >> PAGE_SHIFT); full_page = (sg[i].length & (PAGE_SIZE - 1)) == 0; - if ((pfn == pfn_cur_next) && full_page_cur) + if (pfn == pfn_cur_next && full_page_cur) goto out_head; - if ((pfn_next == pfn_cur) && full_page) + if (pfn_next == pfn_cur && full_page) goto out_tail; } @@ -478,27 +470,26 @@ static int sgv_check_tail_clustering(struct scatterlist *sg, int cur, int hint) #ifdef SCST_HIGHMEM if (page >= highmem_start_page) { - TRACE_MEM("%s", "HIGHMEM page allocated, no clustering") + TRACE_MEM("HIGHMEM page allocated, no clustering") goto out; } #endif #if 0 TRACE_MEM("pfn_cur %ld, pfn_cur_next %ld, len_cur %d, full_page_cur %d", - pfn_cur, pfn_cur_next, len_cur, full_page_cur); + pfn_cur, pfn_cur_next, len_cur, full_page_cur); #endif if (cur == 0) goto out; prev = cur - 1; - pfn_prev = page_to_pfn(sg_page(&sg[prev])) + - (sg[prev].length >> PAGE_SHIFT); + pfn_prev = page_to_pfn(sg_page(&sg[prev])) + (sg[prev].length >> PAGE_SHIFT); full_page = (sg[prev].length & (PAGE_SIZE - 1)) == 0; - if ((pfn_prev == pfn_cur) && full_page) { + if (pfn_prev == pfn_cur && full_page) { TRACE_MEM("SG segment %d will be tail merged with segment %d", - cur, prev); + cur, prev); sg[prev].length += len_cur; sg_clear(&sg[cur]); res = prev; @@ -508,8 +499,7 @@ out: return res; } -static void sgv_free_sys_sg_entries(struct scatterlist *sg, int sg_count, - void *priv) +static void sgv_free_sys_sg_entries(struct scatterlist *sg, int sg_count, void *priv) { int i; @@ -521,13 +511,13 @@ static void sgv_free_sys_sg_entries(struct scatterlist *sg, int sg_count, int pages = PAGE_ALIGN(len) >> PAGE_SHIFT; TRACE_MEM("page %lx, len %d, pages %d", - (unsigned long)p, len, pages); + (unsigned long)p, len, pages); while (pages > 0) { int order = 0; TRACE_MEM("free_pages(): order %d, page %lx", - order, (unsigned long)p); + order, (unsigned long)p); __free_pages(p, order); @@ -537,24 +527,22 @@ static void sgv_free_sys_sg_entries(struct scatterlist *sg, int sg_count, } } -static struct page *sgv_alloc_sys_pages(struct scatterlist *sg, - gfp_t gfp_mask, void *priv) +static struct page *sgv_alloc_sys_pages(struct scatterlist *sg, gfp_t gfp_mask, void *priv) { struct page *page = alloc_pages(gfp_mask, 0); sg_set_page(sg, page, PAGE_SIZE, 0); TRACE_MEM("page=%p, sg=%p, priv=%p", page, sg, priv); - if (page == NULL) { - TRACE(TRACE_OUT_OF_MEM, "%s", "Allocation of " - "sg page failed"); - } + if (!page) + TRACE(TRACE_OUT_OF_MEM, "Allocation of sg page failed"); + return page; } -static int sgv_alloc_sg_entries(struct scatterlist *sg, int pages, - gfp_t gfp_mask, enum sgv_clustering_types clustering_type, - struct trans_tbl_ent *trans_tbl, - const struct sgv_pool_alloc_fns *alloc_fns, void *priv) +static int sgv_alloc_sg_entries(struct scatterlist *sg, int pages, gfp_t gfp_mask, + enum sgv_clustering_types clustering_type, + struct trans_tbl_ent *trans_tbl, + const struct sgv_pool_alloc_fns *alloc_fns, void *priv) { int sg_count = 0; int pg, i, j; @@ -570,16 +558,16 @@ static int sgv_alloc_sg_entries(struct scatterlist *sg, int pages, #endif for (pg = 0; pg < pages; pg++) { - void *rc; + void *ret; + #ifdef CONFIG_SCST_DEBUG_OOM if (((gfp_mask & __GFP_NOFAIL) != __GFP_NOFAIL) && ((scst_random() % 10000) == 55)) - rc = NULL; + ret = NULL; else #endif - rc = alloc_fns->alloc_pages_fn(&sg[sg_count], gfp_mask, - priv); - if (rc == NULL) + ret = alloc_fns->alloc_pages_fn(&sg[sg_count], gfp_mask, priv); + if (!ret) goto out_no_mem; /* @@ -598,20 +586,20 @@ static int sgv_alloc_sg_entries(struct scatterlist *sg, int pages, if (merged == -1) sg_count++; - TRACE_MEM("pg=%d, merged=%d, sg_count=%d", pg, merged, - sg_count); + TRACE_MEM("pg=%d, merged=%d, sg_count=%d", + pg, merged, sg_count); } - if ((clustering_type != sgv_no_clustering) && (trans_tbl != NULL)) { + if (clustering_type != sgv_no_clustering && trans_tbl) { pg = 0; for (i = 0; i < pages; i++) { int n = PAGE_ALIGN(sg[i].length) >> PAGE_SHIFT; trans_tbl[i].pg_count = pg; for (j = 0; j < n; j++) - trans_tbl[pg++].sg_num = i+1; - TRACE_MEM("i=%d, n=%d, pg_count=%d", i, n, - trans_tbl[i].pg_count); + trans_tbl[pg++].sg_num = i + 1; + TRACE_MEM("i=%d, n=%d, pg_count=%d", + i, n, trans_tbl[i].pg_count); } } @@ -625,8 +613,7 @@ out_no_mem: goto out; } -static int sgv_alloc_arrays(struct sgv_pool_obj *obj, - int pages_to_alloc, gfp_t gfp_mask) +static int sgv_alloc_arrays(struct sgv_pool_obj *obj, int pages_to_alloc, gfp_t gfp_mask) { int sz, tsz = 0; int res = 0; @@ -636,9 +623,9 @@ static int sgv_alloc_arrays(struct sgv_pool_obj *obj, sz = pages_to_alloc * sizeof(obj->sg_entries[0]); obj->sg_entries = kmalloc(sz, gfp_mask); - if (unlikely(obj->sg_entries == NULL)) { - TRACE(TRACE_OUT_OF_MEM, "Allocation of sgv_pool_obj " - "SG vector failed (size %d)", sz); + if (unlikely(!obj->sg_entries)) { + TRACE(TRACE_OUT_OF_MEM, + "Allocation of sgv_pool_obj SG vector failed (size %d)", sz); res = -ENOMEM; goto out; } @@ -647,8 +634,7 @@ static int sgv_alloc_arrays(struct sgv_pool_obj *obj, if (sgv_pool_clustered(obj->owner_pool)) { if (pages_to_alloc <= sgv_max_trans_pages) { - obj->trans_tbl = - (struct trans_tbl_ent *)obj->sg_entries_data; + obj->trans_tbl = (struct trans_tbl_ent *)obj->sg_entries_data; /* * No need to clear trans_tbl, if needed, it will be * fully rewritten in sgv_alloc_sg_entries() @@ -656,18 +642,17 @@ static int sgv_alloc_arrays(struct sgv_pool_obj *obj, } else { tsz = pages_to_alloc * sizeof(obj->trans_tbl[0]); obj->trans_tbl = kzalloc(tsz, gfp_mask); - if (unlikely(obj->trans_tbl == NULL)) { - TRACE(TRACE_OUT_OF_MEM, "Allocation of " - "trans_tbl failed (size %d)", tsz); + if (unlikely(!obj->trans_tbl)) { + TRACE(TRACE_OUT_OF_MEM, + "Allocation of trans_tbl failed (size %d)", tsz); res = -ENOMEM; goto out_free; } } } - TRACE_MEM("pages_to_alloc %d, sz %d, tsz %d, obj %p, sg_entries %p, " - "trans_tbl %p", pages_to_alloc, sz, tsz, obj, obj->sg_entries, - obj->trans_tbl); + TRACE_MEM("pages_to_alloc %d, sz %d, tsz %d, obj %p, sg_entries %p, trans_tbl %p", + pages_to_alloc, sz, tsz, obj, obj->sg_entries, obj->trans_tbl); out: TRACE_EXIT_RES(res); @@ -679,8 +664,8 @@ out_free: goto out; } -static struct sgv_pool_obj *sgv_get_obj(struct sgv_pool *pool, int cache_num, - int pages, gfp_t gfp_mask, bool get_new) +static struct sgv_pool_obj *sgv_get_obj(struct sgv_pool *pool, int cache_num, int pages, + gfp_t gfp_mask, bool get_new) { struct sgv_pool_obj *obj; @@ -693,7 +678,7 @@ static struct sgv_pool_obj *sgv_get_obj(struct sgv_pool *pool, int cache_num, if (likely(!list_empty(&pool->recycling_lists[cache_num]))) { obj = list_first_entry(&pool->recycling_lists[cache_num], - struct sgv_pool_obj, recycling_list_entry); + struct sgv_pool_obj, recycling_list_entry); list_del(&obj->sorted_recycling_list_entry); list_del(&obj->recycling_list_entry); @@ -710,11 +695,10 @@ get_new: spin_unlock_bh(&pool->sgv_pool_lock); - TRACE_MEM("New cached entries %d (pool %p)", pool->cached_entries, - pool); + TRACE_MEM("New cached entries %d (pool %p)", + pool->cached_entries, pool); - obj = kmem_cache_alloc(pool->caches[cache_num], - gfp_mask & ~(__GFP_HIGHMEM|GFP_DMA)); + obj = kmem_cache_alloc(pool->caches[cache_num], gfp_mask & ~(__GFP_HIGHMEM | GFP_DMA)); if (likely(obj)) { memset(obj, 0, sizeof(*obj)); obj->cache_num = cache_num; @@ -739,30 +723,30 @@ static void sgv_put_obj(struct sgv_pool_obj *obj) spin_lock_bh(&pool->sgv_pool_lock); - TRACE_MEM("sgv %p, cache num %d, pages %d, sg_count %d", obj, - obj->cache_num, pages, obj->sg_count); + TRACE_MEM("sgv %p, cache num %d, pages %d, sg_count %d", + obj, obj->cache_num, pages, obj->sg_count); if (sgv_pool_clustered(pool)) { /* Make objects with less entries more preferred */ __list_for_each(entry, list) { - struct sgv_pool_obj *tmp = list_entry(entry, - struct sgv_pool_obj, recycling_list_entry); + struct sgv_pool_obj *tmp = list_entry(entry, struct sgv_pool_obj, + recycling_list_entry); TRACE_MEM("tmp %p, cache num %d, pages %d, sg_count %d", - tmp, tmp->cache_num, tmp->pages, tmp->sg_count); + tmp, tmp->cache_num, tmp->pages, tmp->sg_count); if (obj->sg_count <= tmp->sg_count) break; } entry = entry->prev; - } else + } else { entry = list; + } TRACE_MEM("Adding in %p (list %p)", entry, list); list_add(&obj->recycling_list_entry, entry); - list_add_tail(&obj->sorted_recycling_list_entry, - &pool->sorted_recycling_list); + list_add_tail(&obj->sorted_recycling_list_entry, &pool->sorted_recycling_list); obj->time_stamp = jiffies; @@ -771,12 +755,10 @@ static void sgv_put_obj(struct sgv_pool_obj *obj) if (!pool->purge_work_scheduled) { TRACE_MEM("Scheduling purge work for pool %p", pool); pool->purge_work_scheduled = true; - schedule_delayed_work(&pool->sgv_purge_work, - pool->purge_interval); + schedule_delayed_work(&pool->sgv_purge_work, pool->purge_interval); } spin_unlock_bh(&pool->sgv_pool_lock); - return; } /* No locks */ @@ -796,13 +778,9 @@ static int sgv_hiwmk_check(int pages_to_alloc) pages = __sgv_shrink(pages, 0, &freed); if (pages > 0) { - TRACE(TRACE_OUT_OF_MEM, "Requested amount of " - "memory (%d pages) for being executed " - "commands together with the already " - "allocated memory exceeds the allowed " - "maximum %d. Should you increase " - "scst_max_cmd_mem?", pages_to_alloc, - sgv_hi_wmk); + TRACE(TRACE_OUT_OF_MEM, + "Requested amount of memory (%d pages) for being executed commands together with the already allocated memory exceeds the allowed maximum %d. Should you increase scst_max_cmd_mem?", + pages_to_alloc, sgv_hi_wmk); atomic_inc(&sgv_releases_on_hiwmk_failed); res = -ENOMEM; goto out_unlock; @@ -812,8 +790,8 @@ static int sgv_hiwmk_check(int pages_to_alloc) atomic_add(pages_to_alloc, &sgv_pages_total); out_unlock: - TRACE_MEM("pages_to_alloc %d, new total %d", pages_to_alloc, - atomic_read(&sgv_pages_total)); + TRACE_MEM("pages_to_alloc %d, new total %d", + pages_to_alloc, atomic_read(&sgv_pages_total)); #endif return res; } @@ -823,10 +801,9 @@ static void sgv_hiwmk_uncheck(int pages) { #ifndef CONFIG_SCST_NO_TOTAL_MEM_CHECKS atomic_sub(pages, &sgv_pages_total); - TRACE_MEM("pages %d, new total %d", pages, - atomic_read(&sgv_pages_total)); + TRACE_MEM("pages %d, new total %d", + pages, atomic_read(&sgv_pages_total)); #endif - return; } /* No locks */ @@ -837,18 +814,15 @@ static bool sgv_check_allowed_mem(struct scst_mem_lim *mem_lim, int pages) alloced = atomic_add_return(pages, &mem_lim->alloced_pages); if (unlikely(alloced > mem_lim->max_allowed_pages)) { - TRACE(TRACE_OUT_OF_MEM, "Requested amount of memory " - "(%d pages) for being executed commands on a device " - "together with the already allocated memory exceeds " - "the allowed maximum %d. Should you increase " - "scst_max_dev_cmd_mem?", pages, - mem_lim->max_allowed_pages); + TRACE(TRACE_OUT_OF_MEM, + "Requested amount of memory (%d pages) for being executed commands on a device together with the already allocated memory exceeds the allowed maximum %d. Should you increase scst_max_dev_cmd_mem?", + pages, mem_lim->max_allowed_pages); atomic_sub(pages, &mem_lim->alloced_pages); res = false; } - TRACE_MEM("mem_lim %p, pages %d, res %d, new alloced %d", mem_lim, - pages, res, atomic_read(&mem_lim->alloced_pages)); + TRACE_MEM("mem_lim %p, pages %d, res %d, new alloced %d", + mem_lim, pages, res, atomic_read(&mem_lim->alloced_pages)); return res; } @@ -858,9 +832,8 @@ static void sgv_uncheck_allowed_mem(struct scst_mem_lim *mem_lim, int pages) { atomic_sub(pages, &mem_lim->alloced_pages); - TRACE_MEM("mem_lim %p, pages %d, new alloced %d", mem_lim, - pages, atomic_read(&mem_lim->alloced_pages)); - return; + TRACE_MEM("mem_lim %p, pages %d, new alloced %d", + mem_lim, pages, atomic_read(&mem_lim->alloced_pages)); } /** @@ -878,9 +851,9 @@ static void sgv_uncheck_allowed_mem(struct scst_mem_lim *mem_lim, int pages) * Allocate an SG vector from the SGV pool and returns pointer to it or * NULL in case of any error. See the SGV pool documentation for more details. */ -struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, - gfp_t gfp_mask, int flags, int *count, - struct sgv_pool_obj **sgv, struct scst_mem_lim *mem_lim, void *priv) +struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, gfp_t gfp_mask, + int flags, int *count, struct sgv_pool_obj **sgv, + struct scst_mem_lim *mem_lim, void *priv) { struct sgv_pool_obj *obj; int cache_num, pages, cnt; @@ -907,11 +880,10 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, pages_to_alloc = max(pool->single_alloc_pages, pages); } - TRACE_MEM("size=%d, pages=%d, pages_to_alloc=%d, cache num=%d, " - "flags=%x, no_cached=%d, *sgv=%p", size, pages, - pages_to_alloc, cache_num, flags, no_cached, *sgv); + TRACE_MEM("size=%d, pages=%d, pages_to_alloc=%d, cache num=%d, flags=%x, no_cached=%d, *sgv=%p", + size, pages, pages_to_alloc, cache_num, flags, no_cached, *sgv); - if (*sgv != NULL) { + if (*sgv) { obj = *sgv; TRACE_MEM("Supplied obj %p, cache num %d", obj, obj->cache_num); @@ -931,10 +903,10 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, allowed_mem_checked = true; obj = sgv_get_obj(pool, cache_num, pages_to_alloc, gfp_mask, - flags & SGV_POOL_ALLOC_GET_NEW); - if (unlikely(obj == NULL)) { - TRACE(TRACE_OUT_OF_MEM, "Allocation of " - "sgv_pool_obj failed (size %d)", size); + flags & SGV_POOL_ALLOC_GET_NEW); + if (unlikely(!obj)) { + TRACE(TRACE_OUT_OF_MEM, + "Allocation of sgv_pool_obj failed (size %d)", size); goto out_fail; } @@ -962,8 +934,8 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, sg_init_table(obj->sg_entries, pages_to_alloc); TRACE_MEM("sg_entries %p", obj->sg_entries); if (sgv_pool_clustered(pool)) { - obj->trans_tbl = (struct trans_tbl_ent *) - (obj->sg_entries + pages_to_alloc); + obj->trans_tbl = + (struct trans_tbl_ent *)(obj->sg_entries + pages_to_alloc); TRACE_MEM("trans_tbl %p", obj->trans_tbl); /* * No need to clear trans_tbl, if needed, it @@ -972,8 +944,7 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, */ } } else { - if (unlikely(sgv_alloc_arrays(obj, pages_to_alloc, - gfp_mask) != 0)) + if (unlikely(sgv_alloc_arrays(obj, pages_to_alloc, gfp_mask) != 0)) goto out_fail_free; } @@ -1001,9 +972,9 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, sz = sizeof(*obj) + pages * sizeof(obj->sg_entries[0]); obj = kmalloc(sz, gfp_mask); - if (unlikely(obj == NULL)) { - TRACE(TRACE_OUT_OF_MEM, "Allocation of " - "sgv_pool_obj failed (size %d)", size); + if (unlikely(!obj)) { + TRACE(TRACE_OUT_OF_MEM, + "Allocation of sgv_pool_obj failed (size %d)", size); goto out_fail; } memset(obj, 0, sizeof(*obj)); @@ -1024,32 +995,26 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, TRACE_MEM("Big or no_cached obj %p (size %d)", obj, sz); } - obj->sg_count = sgv_alloc_sg_entries(obj->sg_entries, - pages_to_alloc, gfp_mask, pool->clustering_type, - obj->trans_tbl, &pool->alloc_fns, priv); + obj->sg_count = sgv_alloc_sg_entries(obj->sg_entries, pages_to_alloc, gfp_mask, + pool->clustering_type, obj->trans_tbl, + &pool->alloc_fns, priv); if (unlikely(obj->sg_count <= 0)) { obj->sg_count = 0; - if ((flags & SGV_POOL_RETURN_OBJ_ON_ALLOC_FAIL) && - (cache_num >= 0)) + if ((flags & SGV_POOL_RETURN_OBJ_ON_ALLOC_FAIL) && cache_num >= 0) goto out_return1; else goto out_fail_free_sg_entries; } if (cache_num >= 0) { - atomic_add(pages_to_alloc - obj->sg_count, - &pool->cache_acc[cache_num].merged); + atomic_add(pages_to_alloc - obj->sg_count, &pool->cache_acc[cache_num].merged); } else { if (no_cached) { - atomic_add(pages_to_alloc, - &pool->other_pages); - atomic_add(pages_to_alloc - obj->sg_count, - &pool->other_merged); + atomic_add(pages_to_alloc, &pool->other_pages); + atomic_add(pages_to_alloc - obj->sg_count, &pool->other_merged); } else { - atomic_add(pages_to_alloc, - &pool->big_pages); - atomic_add(pages_to_alloc - obj->sg_count, - &pool->big_merged); + atomic_add(pages_to_alloc, &pool->big_pages); + atomic_add(pages_to_alloc - obj->sg_count, &pool->big_merged); } } @@ -1059,10 +1024,10 @@ success: atomic_inc(&pool->cache_acc[cache_num].total_alloc); if (sgv_pool_clustered(pool)) - cnt = obj->trans_tbl[pages-1].sg_num; + cnt = obj->trans_tbl[pages - 1].sg_num; else cnt = pages; - sg = cnt-1; + sg = cnt - 1; obj->orig_sg = sg; obj->orig_length = obj->sg_entries[sg].length; if (sgv_pool_clustered(pool)) { @@ -1081,12 +1046,12 @@ success: res = obj->sg_entries; *sgv = obj; - obj->sg_entries[cnt-1].length -= PAGE_ALIGN(size) - size; - sg_mark_end(&obj->sg_entries[cnt-1]); + obj->sg_entries[cnt - 1].length -= PAGE_ALIGN(size) - size; + sg_mark_end(&obj->sg_entries[cnt - 1]); - TRACE_MEM("obj=%p, sg_entries %p (size=%d, pages=%d, sg_count=%d, " - "count=%d, last_len=%d)", obj, obj->sg_entries, size, pages, - obj->sg_count, *count, obj->sg_entries[obj->orig_sg].length); + TRACE_MEM("obj=%p, sg_entries %p (size=%d, pages=%d, sg_count=%d, count=%d, last_len=%d)", + obj, obj->sg_entries, size, pages, obj->sg_count, *count, + obj->sg_entries[obj->orig_sg].length); out: TRACE_EXIT_HRES(res); @@ -1107,8 +1072,7 @@ out_return2: out_fail_free_sg_entries: if (obj->sg_entries != obj->sg_entries_data) { - if (obj->trans_tbl != - (struct trans_tbl_ent *)obj->sg_entries_data) { + if (obj->trans_tbl != (struct trans_tbl_ent *)obj->sg_entries_data) { /* kfree() handles NULL parameter */ kfree(obj->trans_tbl); obj->trans_tbl = NULL; @@ -1124,14 +1088,15 @@ out_fail_free: spin_unlock_bh(&pool->sgv_pool_lock); kmem_cache_free(pool->caches[obj->cache_num], obj); - } else + } else { kfree(obj); + } out_fail: res = NULL; *count = 0; *sgv = NULL; - TRACE_MEM("%s", "Allocation failed"); + TRACE_MEM("Allocation failed"); out_uncheck: if (hiwmk_checked) @@ -1166,9 +1131,8 @@ void sgv_pool_free(struct sgv_pool_obj *obj, struct scst_mem_lim *mem_lim) { int pages = (obj->sg_count != 0) ? obj->pages : 0; - TRACE_MEM("Freeing obj %p, cache num %d, pages %d, sg_entries %p, " - "sg_count %d, allocator_priv %p", obj, obj->cache_num, pages, - obj->sg_entries, obj->sg_count, obj->allocator_priv); + TRACE_MEM("Freeing obj %p, cache num %d, pages %d, sg_entries %p, sg_count %d, allocator_priv %p", + obj, obj->cache_num, pages, obj->sg_entries, obj->sg_count, obj->allocator_priv); /* * Enable it if you are investigating a data corruption and want to make @@ -1193,10 +1157,8 @@ void sgv_pool_free(struct sgv_pool_obj *obj, struct scst_mem_lim *mem_lim) while (pages > 0) { if (page_count(p) != 1) { - PRINT_WARNING("Freeing page %p with " - "additional owners (_count %d). " - "Data corruption possible!", - p, page_count(p)); + PRINT_WARNING("Freeing page %p with additional owners (_count %d). Data corruption possible!", + p, page_count(p)); WARN_ON(1); } pages--; @@ -1211,14 +1173,13 @@ void sgv_pool_free(struct sgv_pool_obj *obj, struct scst_mem_lim *mem_lim) sg_unmark_end(&obj->sg_entries[obj->orig_sg]); sgv_put_obj(obj); } else { - obj->owner_pool->alloc_fns.free_pages_fn(obj->sg_entries, - obj->sg_count, obj->allocator_priv); + obj->owner_pool->alloc_fns.free_pages_fn(obj->sg_entries, obj->sg_count, + obj->allocator_priv); kfree(obj); sgv_hiwmk_uncheck(pages); } sgv_uncheck_allowed_mem(mem_lim, pages); - return; } EXPORT_SYMBOL_GPL(sgv_pool_free); @@ -1265,9 +1226,9 @@ struct scatterlist *scst_alloc_sg(int size, gfp_t gfp_mask, int *count) } res = kmalloc_array(pages, sizeof(*res), gfp_mask); - if (res == NULL) { - TRACE(TRACE_OUT_OF_MEM, "Unable to allocate sg for %d pages", - pages); + if (!res) { + TRACE(TRACE_OUT_OF_MEM, + "Unable to allocate sg for %d pages", pages); goto out_uncheck; } @@ -1278,12 +1239,12 @@ struct scatterlist *scst_alloc_sg(int size, gfp_t gfp_mask, int *count) * scst_free_sg() to figure out how many pages are in the SG vector. * So, let's always don't use clustering. */ - cnt = sgv_alloc_sg_entries(res, pages, gfp_mask, sgv_no_clustering, - NULL, &sys_alloc_fns, NULL); + cnt = sgv_alloc_sg_entries(res, pages, gfp_mask, sgv_no_clustering, NULL, &sys_alloc_fns, + NULL); if (cnt <= 0) goto out_free; - res[cnt-1].length -= PAGE_ALIGN(size) - size; + res[cnt - 1].length -= PAGE_ALIGN(size) - size; *count = cnt; @@ -1317,13 +1278,11 @@ void scst_free_sg(struct scatterlist *sg, int count) sgv_free_sys_sg_entries(sg, count, NULL); kfree(sg); - return; } EXPORT_SYMBOL_GPL(scst_free_sg); /* Must be called under sgv_pools_mutex */ -static void sgv_pool_init_cache(struct sgv_pool *pool, int cache_num, - bool per_cpu) +static void sgv_pool_init_cache(struct sgv_pool *pool, int cache_num, bool per_cpu) { int size; int pages; @@ -1339,18 +1298,17 @@ static void sgv_pool_init_cache(struct sgv_pool *pool, int cache_num, pages = pool->single_alloc_pages; if (pages <= sgv_max_local_pages) { - size = sizeof(*obj) + pages * - (sizeof(obj->sg_entries[0]) + - ((pool->clustering_type != sgv_no_clustering) ? - sizeof(obj->trans_tbl[0]) : 0)); + size = sizeof(*obj) + pages * (sizeof(obj->sg_entries[0]) + + ((pool->clustering_type != sgv_no_clustering) ? + sizeof(obj->trans_tbl[0]) : 0)); } else if (pages <= sgv_max_trans_pages) { /* * sg_entries is allocated outside object, * but trans_tbl is still embedded. */ size = sizeof(*obj) + pages * - (((pool->clustering_type != sgv_no_clustering) ? - sizeof(obj->trans_tbl[0]) : 0)); + ((pool->clustering_type != sgv_no_clustering) ? + sizeof(obj->trans_tbl[0]) : 0); } else { size = sizeof(*obj); /* both sgv and trans_tbl are kmalloc'ed() */ @@ -1358,20 +1316,17 @@ static void sgv_pool_init_cache(struct sgv_pool *pool, int cache_num, TRACE_MEM("pages=%d, size=%d (per cpu %d)", pages, size, per_cpu); - scnprintf(pool->cache_names[cache_num], - sizeof(pool->cache_names[cache_num]), - "%s-%uK", pool->name, (pages << PAGE_SHIFT) >> 10); - pool->caches[cache_num] = kmem_cache_create( - pool->cache_names[cache_num], size, - 0, per_cpu ? SCST_SLAB_FLAGS : - (SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN), NULL); - return; + scnprintf(pool->cache_names[cache_num], sizeof(pool->cache_names[cache_num]), + "%s-%uK", pool->name, (pages << PAGE_SHIFT) >> 10); + pool->caches[cache_num] = kmem_cache_create(pool->cache_names[cache_num], size, 0, + per_cpu ? SCST_SLAB_FLAGS : + (SCST_SLAB_FLAGS | SLAB_HWCACHE_ALIGN), NULL); } /* Must be called under sgv_pools_mutex */ static int sgv_pool_init(struct sgv_pool *pool, const char *name, - enum sgv_clustering_types clustering_type, int single_alloc_pages, - int purge_interval, bool per_cpu) + enum sgv_clustering_types clustering_type, int single_alloc_pages, + int purge_interval, bool per_cpu) { int res = -ENOMEM; int i; @@ -1380,7 +1335,7 @@ static int sgv_pool_init(struct sgv_pool *pool, const char *name, if (single_alloc_pages < 0) { PRINT_ERROR("Wrong single_alloc_pages value %d", - single_alloc_pages); + single_alloc_pages); res = -EINVAL; goto out; } @@ -1402,8 +1357,9 @@ static int sgv_pool_init(struct sgv_pool *pool, const char *name, /* Let's pretend that it's always scheduled */ pool->purge_work_scheduled = 1; } - } else + } else { pool->purge_interval = SGV_DEFAULT_PURGE_INTERVAL; + } if (single_alloc_pages == 0) { pool->max_caches = SGV_POOL_ELEMENTS; pool->max_cached_pages = 1 << (SGV_POOL_ELEMENTS - 1); @@ -1414,20 +1370,18 @@ static int sgv_pool_init(struct sgv_pool *pool, const char *name, pool->alloc_fns.alloc_pages_fn = sgv_alloc_sys_pages; pool->alloc_fns.free_pages_fn = sgv_free_sys_sg_entries; - TRACE_MEM("name %s, sizeof(*obj)=%zd, clustering_type=%d, " - "single_alloc_pages=%d, max_caches=%d, max_cached_pages=%d", - name, sizeof(struct sgv_pool_obj), clustering_type, - single_alloc_pages, pool->max_caches, pool->max_cached_pages); + TRACE_MEM("name %s, sizeof(*obj)=%zd, clustering_type=%d, single_alloc_pages=%d, max_caches=%d, max_cached_pages=%d", + name, sizeof(struct sgv_pool_obj), clustering_type, single_alloc_pages, + pool->max_caches, pool->max_cached_pages); - strscpy(pool->name, name, sizeof(pool->name)-1); + strscpy(pool->name, name, sizeof(pool->name) - 1); pool->owner_mm = current->mm; for (i = 0; i < pool->max_caches; i++) { sgv_pool_init_cache(pool, i, per_cpu); - if (pool->caches[i] == NULL) { - PRINT_ERROR("Allocation of sgv_pool " - "cache %s(%d) failed", name, i); + if (!pool->caches[i]) { + PRINT_ERROR("Allocation of sgv_pool cache %s(%d) failed", name, i); goto out_free; } } @@ -1479,8 +1433,7 @@ static void sgv_evaluate_local_max_pages(void) sgv_max_trans_pages = space4sgv_ttbl / sizeof(struct trans_tbl_ent); TRACE_MEM("sgv_max_local_pages %d, sgv_max_trans_pages %d", - sgv_max_local_pages, sgv_max_trans_pages); - return; + sgv_max_local_pages, sgv_max_trans_pages); } /* @@ -1500,8 +1453,8 @@ void sgv_pool_flush(struct sgv_pool *pool) spin_lock_bh(&pool->sgv_pool_lock); while (!list_empty(&pool->recycling_lists[i])) { - obj = list_first_entry(&pool->recycling_lists[i], - struct sgv_pool_obj, recycling_list_entry); + obj = list_first_entry(&pool->recycling_lists[i], struct sgv_pool_obj, + recycling_list_entry); __sgv_purge_from_cache(obj); @@ -1516,7 +1469,6 @@ void sgv_pool_flush(struct sgv_pool *pool) } TRACE_EXIT(); - return; } EXPORT_SYMBOL_GPL(sgv_pool_flush); @@ -1552,7 +1504,6 @@ static void sgv_pool_destroy(struct sgv_pool *pool) out: TRACE_EXIT(); - return; } /** @@ -1566,12 +1517,11 @@ out: * See the SGV pool documentation for more details. */ void sgv_pool_set_allocator(struct sgv_pool *pool, - struct page *(*alloc_pages_fn)(struct scatterlist *, gfp_t, void *), - void (*free_pages_fn)(struct scatterlist *, int, void *)) + struct page *(*alloc_pages_fn)(struct scatterlist *, gfp_t, void *), + void (*free_pages_fn)(struct scatterlist *, int, void *)) { pool->alloc_fns.alloc_pages_fn = alloc_pages_fn; pool->alloc_fns.free_pages_fn = free_pages_fn; - return; } EXPORT_SYMBOL_GPL(sgv_pool_set_allocator); @@ -1601,19 +1551,17 @@ EXPORT_SYMBOL_GPL(sgv_pool_set_allocator); * Description: * Returns the resulting SGV pool or NULL in case of any error. */ -struct sgv_pool *sgv_pool_create_node(const char *name, - enum sgv_clustering_types clustering_type, - int single_alloc_pages, bool shared, int purge_interval, int nodeid) +struct sgv_pool *sgv_pool_create_node(const char *name, enum sgv_clustering_types clustering_type, + int single_alloc_pages, bool shared, int purge_interval, + int nodeid) { struct sgv_pool *pool, *tp; int rc; TRACE_ENTRY(); - TRACE_MEM("Creating pool %s (clustering_type %d, " - "single_alloc_pages %d, shared %d, purge_interval %d, " - "nodeid %d)", name, clustering_type, single_alloc_pages, - shared, purge_interval, nodeid); + TRACE_MEM("Creating pool %s (clustering_type %d, single_alloc_pages %d, shared %d, purge_interval %d, nodeid %d)", + name, clustering_type, single_alloc_pages, shared, purge_interval, nodeid); /* * __sgv_shrink() takes sgv_pools_mutex, so we have to play tricks to @@ -1621,9 +1569,9 @@ struct sgv_pool *sgv_pool_create_node(const char *name, */ pool = kmem_cache_alloc_node(sgv_pool_cachep, GFP_KERNEL, nodeid); - if (pool == NULL) { + if (!pool) { PRINT_ERROR("Allocation of sgv_pool failed (size %zd)", - sizeof(*pool)); + sizeof(*pool)); goto out; } memset(pool, 0, sizeof(*pool)); @@ -1634,9 +1582,8 @@ struct sgv_pool *sgv_pool_create_node(const char *name, if (strcmp(tp->name, name) == 0) { if (shared) { if (tp->owner_mm != current->mm) { - PRINT_ERROR("Attempt of a shared use " - "of SGV pool %s with " - "different MM", name); + PRINT_ERROR("Attempt of a shared use of SGV pool %s with different MM", + name); goto out_free; } sgv_pool_get(tp); @@ -1650,8 +1597,8 @@ struct sgv_pool *sgv_pool_create_node(const char *name, } tp = NULL; - rc = sgv_pool_init(pool, name, clustering_type, single_alloc_pages, - purge_interval, nodeid != NUMA_NO_NODE); + rc = sgv_pool_init(pool, name, clustering_type, single_alloc_pages, purge_interval, + nodeid != NUMA_NO_NODE); if (rc != 0) goto out_free; @@ -1659,7 +1606,7 @@ out_unlock: mutex_unlock(&sgv_pools_mutex); out: - TRACE_EXIT_RES(pool != NULL); + TRACE_EXIT_HRES(pool); return pool; out_free: @@ -1678,8 +1625,7 @@ void sgv_pool_get(struct sgv_pool *pool) { atomic_inc(&pool->sgv_pool_ref); TRACE_MEM("Incrementing sgv pool %p ref (new value %d)", - pool, atomic_read(&pool->sgv_pool_ref)); - return; + pool, atomic_read(&pool->sgv_pool_ref)); } EXPORT_SYMBOL_GPL(sgv_pool_get); @@ -1692,10 +1638,9 @@ EXPORT_SYMBOL_GPL(sgv_pool_get); void sgv_pool_put(struct sgv_pool *pool) { TRACE_MEM("Decrementing sgv pool %p ref (new value %d)", - pool, atomic_read(&pool->sgv_pool_ref)-1); + pool, atomic_read(&pool->sgv_pool_ref) - 1); if (atomic_dec_and_test(&pool->sgv_pool_ref)) sgv_pool_destroy(pool); - return; } EXPORT_SYMBOL_GPL(sgv_pool_put); @@ -1714,7 +1659,6 @@ void sgv_pool_del(struct sgv_pool *pool) sgv_pool_put(pool); TRACE_EXIT(); - return; } EXPORT_SYMBOL_GPL(sgv_pool_del); @@ -1760,8 +1704,8 @@ int __init scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmar TRACE_ENTRY(); - sgv_pool_cachep = KMEM_CACHE(sgv_pool, SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN); - if (sgv_pool_cachep == NULL) + sgv_pool_cachep = KMEM_CACHE(sgv_pool, SCST_SLAB_FLAGS | SLAB_HWCACHE_ALIGN); + if (!sgv_pool_cachep) goto out_err; sgv_hi_wmk = mem_hwmark; @@ -1770,17 +1714,15 @@ int __init scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmar sgv_evaluate_local_max_pages(); sgv_norm_pool_main = sgv_pool_create("sgv", sgv_no_clustering, 0, false, 0); - if (sgv_norm_pool_main == NULL) + if (!sgv_norm_pool_main) goto out_free_pool; - sgv_norm_clust_pool_main = sgv_pool_create("sgv-clust", - sgv_full_clustering, 0, false, 0); - if (sgv_norm_clust_pool_main == NULL) + sgv_norm_clust_pool_main = sgv_pool_create("sgv-clust", sgv_full_clustering, 0, false, 0); + if (!sgv_norm_clust_pool_main) goto out_free_norm; - sgv_dma_pool_main = sgv_pool_create("sgv-dma", sgv_no_clustering, 0, - false, 0); - if (sgv_dma_pool_main == NULL) + sgv_dma_pool_main = sgv_pool_create("sgv-dma", sgv_no_clustering, 0, false, 0); + if (!sgv_dma_pool_main) goto out_free_clust; /* @@ -1803,9 +1745,9 @@ int __init scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmar if (!cpu_online(i)) continue; scnprintf(name, sizeof(name), "sgv-%d", i); - sgv_norm_pool_per_cpu[i] = sgv_pool_create_node(name, - sgv_no_clustering, 0, false, 0, cpu_to_node(i)); - if (sgv_norm_pool_per_cpu[i] == NULL) + sgv_norm_pool_per_cpu[i] = sgv_pool_create_node(name, sgv_no_clustering, 0, false, + 0, cpu_to_node(i)); + if (!sgv_norm_pool_per_cpu[i]) goto out_free_per_cpu_norm; } @@ -1815,9 +1757,9 @@ int __init scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmar if (!cpu_online(i)) continue; scnprintf(name, sizeof(name), "sgv-clust-%d", i); - sgv_norm_clust_pool_per_cpu[i] = sgv_pool_create_node(name, - sgv_full_clustering, 0, false, 0, cpu_to_node(i)); - if (sgv_norm_clust_pool_per_cpu[i] == NULL) + sgv_norm_clust_pool_per_cpu[i] = sgv_pool_create_node(name, sgv_full_clustering, 0, + false, 0, cpu_to_node(i)); + if (!sgv_norm_clust_pool_per_cpu[i]) goto out_free_per_cpu_clust; } @@ -1827,9 +1769,9 @@ int __init scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmar if (!cpu_online(i)) continue; scnprintf(name, sizeof(name), "sgv-dma-%d", i); - sgv_dma_pool_per_cpu[i] = sgv_pool_create_node(name, - sgv_no_clustering, 0, false, 0, cpu_to_node(i)); - if (sgv_dma_pool_per_cpu[i] == NULL) + sgv_dma_pool_per_cpu[i] = sgv_pool_create_node(name, sgv_no_clustering, 0, false, + 0, cpu_to_node(i)); + if (!sgv_dma_pool_per_cpu[i]) goto out_free_per_cpu_dma; } @@ -1901,7 +1843,6 @@ void scst_sgv_pools_deinit(void) kmem_cache_destroy(sgv_pool_cachep); TRACE_EXIT(); - return; } static ssize_t sgv_sysfs_stat_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) @@ -1963,8 +1904,8 @@ static ssize_t sgv_sysfs_stat_show(struct kobject *kobj, struct kobj_attribute * return ret; } -static ssize_t sgv_sysfs_stat_reset(struct kobject *kobj, - struct kobj_attribute *attr, const char *buf, size_t count) +static ssize_t sgv_sysfs_stat_reset(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count) { struct sgv_pool *pool; int i; @@ -2026,8 +1967,8 @@ static ssize_t sgv_sysfs_global_stat_show(struct kobject *kobj, struct kobj_attr return ret; } -static ssize_t sgv_sysfs_global_stat_reset(struct kobject *kobj, - struct kobj_attribute *attr, const char *buf, size_t count) +static ssize_t sgv_sysfs_global_stat_reset(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count) { TRACE_ENTRY(); @@ -2037,20 +1978,20 @@ static ssize_t sgv_sysfs_global_stat_reset(struct kobject *kobj, atomic_set(&sgv_other_total_alloc, 0); #endif - PRINT_INFO("%s", "Global SGV pool statistics reset"); + PRINT_INFO("Global SGV pool statistics reset"); TRACE_EXIT_RES(count); return count; } static struct kobj_attribute sgv_stat_attr = - __ATTR(stats, S_IRUGO | S_IWUSR, sgv_sysfs_stat_show, - sgv_sysfs_stat_reset); + __ATTR(stats, 0644, sgv_sysfs_stat_show, sgv_sysfs_stat_reset); static struct attribute *sgv_pool_attrs[] = { &sgv_stat_attr.attr, NULL, }; + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) ATTRIBUTE_GROUPS(sgv_pool); #endif @@ -2062,11 +2003,10 @@ static void sgv_kobj_release(struct kobject *kobj) TRACE_ENTRY(); pool = container_of(kobj, struct sgv_pool, sgv_kobj); - if (pool->sgv_kobj_release_cmpl != NULL) + if (pool->sgv_kobj_release_cmpl) complete_all(pool->sgv_kobj_release_cmpl); TRACE_EXIT(); - return; } static struct kobj_type sgv_pool_ktype = { @@ -2114,13 +2054,14 @@ static void scst_sgv_sysfs_del(struct sgv_pool *pool) } static struct kobj_attribute sgv_global_stat_attr = - __ATTR(global_stats, S_IRUGO | S_IWUSR, sgv_sysfs_global_stat_show, - sgv_sysfs_global_stat_reset); + __ATTR(global_stats, 0644, + sgv_sysfs_global_stat_show, sgv_sysfs_global_stat_reset); static struct attribute *sgv_def_attrs[] = { &sgv_global_stat_attr.attr, NULL, }; + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) ATTRIBUTE_GROUPS(sgv_def); #endif |