summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2024-07-02 16:01:33 +0200
committerFabian Groffen <grobian@gentoo.org>2024-07-02 16:03:25 +0200
commitdc64c2c846bf8301f6a4295fbd2777cf357ef88b (patch)
treee3f8c522e4913039734bde9d82ad8e4f8a029379 /sys-apps/flashrom/files
parentdev-python/apprise: enable py3.13 (diff)
downloadgentoo-dc64c2c846bf8301f6a4295fbd2777cf357ef88b.tar.gz
gentoo-dc64c2c846bf8301f6a4295fbd2777cf357ef88b.tar.bz2
gentoo-dc64c2c846bf8301f6a4295fbd2777cf357ef88b.zip
sys-apps/flashrom-1.3.0-r3: fix function definition mismatch for real
Previous patch was bonkers and caused by spi_master backport patch that was adapted in a wrong way. Fix for real now by (not) changing the signature. 1.4.0 should resolve this entire mess for us. Closes: https://bugs.gentoo.org/915617 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-apps/flashrom/files')
-rw-r--r--sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch11
-rw-r--r--sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch8
2 files changed, 6 insertions, 13 deletions
diff --git a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch b/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
deleted file mode 100644
index 22243937b960..000000000000
--- a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/dummyflasher.c
-+++ b/dummyflasher.c
-@@ -930,7 +930,7 @@
- .read = default_spi_read,
- .write_256 = dummy_spi_write_256,
- .write_aai = default_spi_write_aai,
-- .probe_opcode = dummy_spi_probe_opcode,
-+ .probe_opcode = &dummy_spi_probe_opcode,
- };
-
- static const struct par_master par_master_dummyflasher = {
diff --git a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
index 72298f8cfca3..ae2641af4a0a 100644
--- a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
+++ b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
@@ -1,6 +1,10 @@
Backported upstream commit
https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f396719
+This commit didn't apply straight because const/non-const changes were
+made inbetween, so there are some additional changes to silence more
+picky compilers like https://bugs.gentoo.org/915617
+
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -148,7 +148,6 @@
@@ -77,7 +81,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39
int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, int unsigned len);
-+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode);
++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode);
/* spi25.c */
int probe_spi_rdid(struct flashctx *flash);
@@ -235,7 +239,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39
}
-bool default_spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
-+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode)
++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
{
- return true;
+ if (!flash->mst->spi.probe_opcode)