Fix build warnings

Also include skiboot.lid.xz file

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
This commit is contained in:
Vasant Hegde 2017-04-19 11:38:09 +05:30
parent 919e92b216
commit 696ada83a4
2 changed files with 72 additions and 6 deletions

View File

@ -1,6 +1,6 @@
Name: opal-prd
Version: 5.5.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: OPAL Processor Recovery Diagnostics Daemon
Group: System Environment/Daemons
@ -11,12 +11,15 @@ URL: http://github.com/open-power/skiboot
ExclusiveArch: ppc64le
BuildRequires: systemd
BuildRequires: gcc-powerpc64-linux-gnu
BuildRequires: openssl-devel
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Source0: https://github.com/open-power/skiboot/archive/skiboot-%{version}.tar.gz
Patch0: skiboot-5.5.0-Fix-build-warnings.patch
%description
This package provides a daemon to load and run the OpenPower firmware's
@ -48,13 +51,14 @@ services to the OS (Linux) on IBM Power and OpenPower systems.
%prep
%setup -q -n skiboot-skiboot-%{version}
%patch0 -p1 -b .Fix-build-warnings
%build
OPAL_PRD_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/opal-prd
GARD_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/gard
PFLASH_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/pflash
make V=1 CFLAGS="%{optflags}" -C external/xscom-utils
SKIBOOT_VERSION=%{version} CROSS= make V=1 %{?_smp_mflags}
XSCOM_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/xscom-utils
SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-" CFLAGS="%{optflags}"
%install
make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr
@ -67,6 +71,7 @@ install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opa
mkdir -p %{buildroot}%{_datadir}/qemu
install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
install -m 644 -p skiboot.lid.xz %{buildroot}%{_datadir}/qemu/skiboot.lid.xz
%post
%systemd_post opal-prd.service
@ -78,14 +83,14 @@ install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
%systemd_postun_with_restart opal-prd.service
%files
%doc README
%doc README.md
%license LICENCE
%{_sbindir}/opal-prd
%{_unitdir}/opal-prd.service
%{_mandir}/man8/*
%files -n opal-utils
%doc README
%doc README.md
%license LICENCE
%{_sbindir}/opal-gard
%{_sbindir}/getscom
@ -94,11 +99,15 @@ install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
%{_mandir}/man1/*
%files -n opal-firmware
%doc README
%doc README.md
%license LICENCE
%{_datadir}/qemu/
%changelog
* Tue Apr 19 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-2
- Fix build warning
- Include skiboot.lid.xz file
* Tue Apr 18 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-1
- Update to latest upstream 5.5.0

View File

@ -0,0 +1,57 @@
From 5ba562436eceb8ebf90032f595d963e869472ddd Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Wed, 19 Apr 2017 11:36:08 +0530
Subject: [PATCH] Fix build warnings
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
Makefile.main | 3 +--
core/pcie-slot.c | 4 +++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile.main b/Makefile.main
index 5494131..5a66324 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -190,7 +190,6 @@ pflash-coverity:
(cd external/pflash; ./build-all-arch.sh)
all: $(SUBDIRS) $(TARGET).lid $(TARGET).lid.xz $(TARGET).map extract-gcov
-all: $(TARGET).lid.stb $(TARGET).lid.xz.stb
OBJS := $(ASM) $(CORE) $(HW) $(PLATFORMS) $(LIBFDT) $(LIBFLASH) $(LIBSTB)
ifeq ($(PORE),1)
@@ -278,7 +277,7 @@ clean:
$(RM) *.[odsa] $(SUBDIRS:%=%/*.[odsa])
$(RM) *.elf $(TARGET).lid *.map $(TARGET).lds $(TARGET).lid.xz
$(RM) include/asm-offsets.h version.c .version
- $(RM) extract-gcov $(TARGET).lid.stb $(TARGET).lid.xz.stb
+ $(RM) extract-gcov
distclean: clean
$(RM) *~ $(SUBDIRS:%=%/*~) include/*~
diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index 022668a..e649fd0 100644
--- a/core/pcie-slot.c
+++ b/core/pcie-slot.c
@@ -404,7 +404,7 @@ static int64_t pcie_slot_sm_hreset(struct pci_slot *slot)
*/
static int64_t pcie_slot_sm_freset(struct pci_slot *slot)
{
- uint8_t power_state = PCI_SLOT_POWER_ON;
+ uint8_t power_state;
switch (slot->state) {
case PCI_SLOT_STATE_NORMAL:
@@ -416,6 +416,8 @@ static int64_t pcie_slot_sm_freset(struct pci_slot *slot)
if (slot->ops.get_power_state) {
PCIE_SLOT_DBG(slot, "FRESET: Retrieve power state\n");
slot->ops.get_power_state(slot, &power_state);
+ } else {
+ power_state = PCI_SLOT_POWER_ON;
}
/* In power on state, power it off */
--
2.9.3